replace-filter-nginx-module icon indicating copy to clipboard operation
replace-filter-nginx-module copied to clipboard

replace letter to $ issue

Open missyoyo opened this issue 5 years ago • 1 comments

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 '

' '' g; I need it to be ''. But I still get two $$ as result 图片 Thank you for your help.

missyoyo avatar Mar 01 '20 18:03 missyoyo

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 $.

Z3r0byte avatar May 13 '21 09:05 Z3r0byte