Welcome! Log In Create A New Profile

Advanced

Re: Unable to escape $ sign in subs_filter

Maxim Dounin
October 11, 2017 09:20AM
Hello!

On Tue, Oct 10, 2017 at 07:06:40PM -0400, omar_h wrote:

> Hello,
>
> I am trying to add some code to a page which contains a $ symbol. However,
> I am getting the following error:
>
> nginx: [emerg] invalid variable name
>
> Here is a simple example of the config:
>
> subs_filter 'example' '$';
>
> Is there any way to escape the $ symbol? The issue occurs even with single
> brackets, which normally should take strings as literal without any variable
> substitution. It seems like a bug since this behavior should only occur
> with double brackets.

In nginx, there is no difference between single and double quotes,
they are handled equally.

> This issue was also discussed in the past, however, the workarounds don't
> work in my case
> https://forum.nginx.org/read.php?29,243808,243808#msg-243808
> https://forum.nginx.org/read.php?2,218536,218536#msg-218536

The workaround with using geo{} still applies.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Unable to escape $ sign in subs_filter

omar_h October 10, 2017 07:06PM

Re: Unable to escape $ sign in subs_filter

Maxim Dounin October 11, 2017 09:20AM

Re: Unable to escape $ sign in subs_filter

joseph-pg October 12, 2017 01:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready