Why doesn’t this work?
<script type="text/javascript" src="js/jquery-1.8.1.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("body").html($("body").html().replace(/®/g, '<sup>®</sup>').replace(/®/g, '<sup>®</sup>').replace("\u00AE" , '<sup>®</sup>'));
};
);
</script>
Firebug in Firefox gives this in the console:
“SyntaxError: missing ) after argument list”
But, this breaks the WordPress entirely…
<script type="text/javascript">
$(document).ready(function() {
$("body").html($("body").html().replace(/®/g, '<sup>®</sup>').replace(/®/g, '<sup>®</sup>').replace("\u00AE" , '<sup>®</sup>'));
}
);
</script>
The basic of this function is to find every single registration mark in the body, and replace it with “®”
If this function is capable in PHP as well, that’s preferable.
It seemed like the best thing to do was to go into the database and just run a sql query to replace all registration marks and wrap it in “” tags.
However, this did work on individual elements. (Like adeneo said, it’s not a good idea to replace the entire site HTML… which broke the site for me)