Tagged: avia editor, html tags
-
AuthorPosts
-
April 12, 2014 at 9:06 am #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,
HolgerApril 12, 2014 at 3:28 pm #250545Hi 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,
DevinApril 12, 2014 at 5:51 pm #250552Hi 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,
HolgerApril 14, 2014 at 3:21 am #250861Hey Holger!
Yeah, try adding this code to your functions.php file:
function br_shortcode_func(){ return "<br>"; } add_shortcode( 'break', 'br_shortcode_func' );
Regards,
JosueApril 15, 2014 at 5:53 am #251431Hi 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,
HolgerApril 15, 2014 at 5:55 am #251432You are welcome Holger, glad we could help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Stripped HTML tags in Avia Editor’ is closed to new replies.