jQuery highlighting special characters in text
I am using
JavaScript text higlighting jQuery plugin http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
It works well for me all the time, except for some symbol开发者_运维技巧s:
$("#preview").highlight($(this).val(), { wordsOnly: true, className: 'blacklist'});
if "$(this).val()" equals to either €, $ or £ - highlight plugin doesn't work. Any idea what it could be?
Don't know exacly why it doesn't work, but the plugin is intended to highlight words/chars, not really special chars. It may have to do with that fact, being special chars. Check if the code you're trying to highlight isn't encoding those special chars to something like €
精彩评论