Created
March 12, 2013 18:34
-
-
Save shrwnsan/5145599 to your computer and use it in GitHub Desktop.
Based on Dan Cederholm's http://simplebits.com/notebook/2008/08/14/ampersands-2/ Crafted this years back to take care of rogue's that the WordPress plugin WP-Typography couldn't take care of, e.g. ampersands, due to priority parsing of the markup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function() { | |
| jQuery('#content div.entry div.info h2 a').each(function() { | |
| var new_text = jQuery(this).html().replace(/&/g, '<span class="amp">&</span>'); | |
| jQuery(this).html(new_text); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment