I am having a problem that I cannot find anywhere documented, I see a regular expression method, but I use a straight line, not a line inside a variable. This is my code:
var src = getQueryVariable("srcStr"); if(src != false){ $(".entry-content").html($(".entry-content") .html().replace(/src/g, "<span style='background-color:#f2e128;'>" + src + "</span>")); }
This takes the url variable (srcStr) and looks for text text inside the .entry content for the string stored in var src .
The problem code is here: replace(/src/g
Is there a solution?
source share