It is necessary to replace all occurrences of [br] in the headers h1 tag </br> . I am writing the following code:
jQuery('h1').each(function() { var text = jQuery(this).text(); text.replace(/\[br]/g, '</br>'); jQuery(this).text(text); }); https://jsfiddle.net/cjq263ex/
Doesn't want to work, although the regular expression seems to be correct.