Use Headings Throughout Your Oxwall Installation Using jQuery

Oxwall, by default, strips out any heading tags when submitting forms. Here’s a workaround

Using Oxwall with plugins such as the forum and third-party articles plugin, you may have noticed that you’re not allowed to enter certain HTML. Well, you can, but it gets stripped once you’ve submitted the form. Instead of digging through core files that will be overwritten after upgrades and patches, we can use some jQuery magic.

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

Add that to your Custom tail code section in the admin panel, or to html_document.html in your theme folder. Whichever you prefer. This code will replace the following,

<p class="h2">This is an example header</p>


<h2 class="h2"><span>This is an example header</span></h2>

Now we can actually start writing some articles without worrying about our headings being stripped!