In this fiddle : http://jsfiddle.net/pUeue/1449/
The alert does not fire correctly as there are quotes within the text :
<input type="button" value="test" />
$('input[type=button]').click( function() {
 s("test - <b>test</b> <b>est - test:  "test" for equities.");   
});
function s(value){
 alert(value)   
}
So if I use instead
<input type="button" value="test" />
$('input[type=button]').click( function() {
 s("test - <b>test</b> <b>est - test:  test for equities.");   
});
function s(value){
 alert(value)   
}
The quotes within the String in first example is causing the issue. Are there other characters I should be aware of which can cause similar issue ?
I think this question is related to List of all characters that should be escaped before put in to RegEx? but in my case I am referring to a javascript String instead of regex
 
     
     
     
     
     
     
     
     
    