We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Which file is stripping out HTML content? | Forum

Tecca Dec 20 '15
Hey there,

I've been trying to dig around and find out what's causing headings (h1, h2, h3, etc) as well as a couple of other HTML elements to be stripped upon form submission. The headings apply fine in the editor itself, but once the HTML is sanitized, it strips it out of the content.

If someone can point me to the right file, that'd be great!

tammy harris
tammy harris Dec 22 '15
i dont know but maybe something to do with css 
i have noticed them values dont have anything in them 
Tecca Dec 24 '15
I haven't really been able to track down the problem. For anyone curious, I'm trying to do this because I use the Articles plugin from iDragon and of course headings are important for articles and SEO, which Oxwall is natively bad at.

My current solution, instead of putting <h2> tags into articles. This can also be useful if you want to use it on the forums or blog plugin, it's the same concept.

$('p.heading').replaceWith(function() {
    return $('<h2>').addClass('heading').append($('<span>').text($(this).text()));

This will replace anything with like <p="heading">Header text here</p>, with the appropriate and semantic <h2="heading"><span>Header text here</span></h2>. Simply use that snippet in the Custom tail code textarea in the admin panel or in html_document.html.
tammy harris
tammy harris Dec 25 '15
tammy harris
tammy harris Feb 5 '16
i have found if you use the html input popup thing to insert html into a textra you need insert if few time  ie keep refresh the page and add the html couple of times then it will finally take the html