• Resolved hugomilan

    (@hugomilan)


    Hi,

    I’m trying to include social icons in a contact form, using CF7 grid layout. The social icons come from the plugin Socicon, which adds social icons as fonts. To include the icon in the contact form, I’m adding the code below. However, after I save the form, the field “border-radius: 50%” is removed. I tried other html tags (p and div) but observed similar behaviors. If CF7 grid layout is deactivated, then this issue is not observed. Is there a work around for this issue?

    <span class=”socicon-researchgate” style=”background-color: #00CCBB; color: white; font-size: 50px; vertical-align: -30%; margin-right: 0; padding: 15px 20px; border-radius: 50%; border: 1px solid #00CCBB; “></span>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    I’m adding the code below.

    where are you adding this code?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I just had a quick-look in the backend, and realise the WP sanitizing function for post content is stripping style attributes from html.

    If CF7 grid layout is deactivated, then this issue is not observed.

    CF7 plugin was built at a time when plugin development was in this infancy, and the author did not sanitize the form fields before saving them to the DB.

    This plugin was developed in more recent years when the WP plugin team is a lot stricter with coding stds.

    Short answer is: not much I can do here, its not a bug, you should not include styling in your html.

    Possibly solution: include only the span with the class,

    
    <span class=”socicon-researchgate”></span>
    

    and enqueue a css stylesheet on your page with the required style.

    Thread Starter hugomilan

    (@hugomilan)

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘border-radius’ is closed to new replies.