You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello:
I am new guy use replace-filter-nginx-module, I want insert some javascript to html body. And my javascript code contain $. When try $$ like this:
replace_filter '' '<script>$$(document).ready(function(){$$(".panel-container").eq(-1).hide();});</script>' g;
I need it to be '<script>$(document).ready(function(){$(".panel-container").eq(-1).hide();});</script>'.
But I still get two $$ as result
Thank you for your help.
The text was updated successfully, but these errors were encountered:
I also came across this issue and after inspecting the source code I couldn't find why it didn't work. I then started looking for a work-around and found that this works:
Place the following in the http block of your nginx config:
geo $dollar {
default "$";
}
Then, you can use ${dollar} in your replace_filter rules to get a single $.
Hello:$. When try $ $ like this:
I am new guy use replace-filter-nginx-module, I want insert some javascript to html body. And my javascript code contain
replace_filter '' '<script>$$(document).ready(function(){$$(".panel-container").eq(-1).hide();});</script>' g;
I need it to be '<script>$(document).ready(function(){$(".panel-container").eq(-1).hide();});</script>'.
But I still get two $$ as result
Thank you for your help.
The text was updated successfully, but these errors were encountered: