Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #250483

    Hi, looks like <br> tags are stripped in the Avia advanced editor. I edit the HTML in the “text only” tab, and it shows ok in the visual tab (see screenshot http://yadi.sk/d/u5qVpesIM8GfC). But on the published page some of the breaks are missing (see screenshot http://yadi.sk/d/_9sR989sM8Gug, arrows indicate places where a line break should occur). When I look back in the “text only” tab, the <br> tags are gone. I know WP strips some HTML tags (like empty <p></p> tags), but never had issues with <br> tags. So I assume this is an issue with the Avia advanced editor. Any advice how to fix this would be appreciated.

    Best regards,
    Holger

    #250545

    Hi Holger!

    I *think* its actually using the same wpautop function in the text elements and I know we’ve talked a lot about it internally because it can be somewhat unpredictable.

    Peter and Kriesi are working on a new code element that will eventually solve this but for the short term the best solution is to either use a shortcode custom made for each usage or to use a plugin like this one which lets you add code snippets to custom shortcodes: https://wordpress.org/plugins/insert-html-snippet/ (note: I have not used this one specifically but it came up first on my search. There are lots of alternatives with various differences)

    Best regards,
    Devin

    #250552

    Hi Devin, just to be sure that I understood it correctly – I register a custom shortcode (say [break]) and use this shortcode instead of the <br> tag?

    Best regards,
    Holger

    #250861

    Hey Holger!

    Yeah, try adding this code to your functions.php file:

    function br_shortcode_func(){
    	return "<br>";
    }
    add_shortcode( 'break', 'br_shortcode_func' );
    

    Regards,
    Josue

    #251431

    Hi Josue,

    thanks for the tip. Looks like the problem solved itself when I edit the page in the visual part only. But will keep your functions.php hack in mind.

    Best regards,
    Holger

    #251432

    You are welcome Holger, glad we could help :)

    Regards,
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Stripped HTML tags in Avia Editor’ is closed to new replies.