title: Nginx escaping ampersand
body: <p>So I have this encoded URL <a href="http://localhost:3050/pdfx/http%3A%2F%2Flocalhost%2Fpdf.html%3FlipperId%3D61%26lang%3Dfr-ca" rel="nofollow">http://localhost:3050/pdfx/http%3A%2F%2Flocalhost%2Fpdf.html%3FlipperId%3D61%26lang%3Dfr-ca</a></p>
  
  <p>that translates to <a href="http://localhost:3050/pdfx/http:/localhost/pdf.html?lipperId=61&amp;lang=fr-ca" rel="nofollow">http://localhost:3050/pdfx/http:/localhost/pdf.html?lipperId=61&amp;lang=fr-ca</a></p>
  
  <p>my nginx.conf is the following </p>
  
  <pre><code>http{
  server {
      listen 3050 default_server;
      listen [::]:3050 default_server ipv6only=on;
  
      root C:\Workspaces\wmsi_workspace\pdf-renderer;
      index index.html index.htm;
  
      # Make site accessible from http://localhost/
      server_name localhost;
  
  
     location ~ ^/pdfx/(.*)$ {
        proxy_pass http://node_phantomjs_server_standard?site=$1;
     }
  
     location ~ ^/pdfxi/ {
        proxy_pass http://node_phantomjs_server_inject;
     }
  
     location ~ ^/api/rps {
        proxy_pass http://node_phantomjs_server_inject;
     }
  
  
      location / {
          try_files $uri $uri/ =404;
      }
  
      error_page 404 500 502 503 504 /index.html;
  
  }
  
  upstream node_phantomjs_server_standard {
    server 127.0.0.1:3000;
  }
  
  upstream node_phantomjs_server_inject {
    server 127.0.0.1:3050;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When I hit the URL above it gets translated to <a href="http://localhost/pdf.html?lipperId=61" rel="nofollow">http://localhost/pdf.html?lipperId=61</a> and completely ignores the filter part of the querystring (not a legit querystring). </p>
  
  <p>I'm not sure why this is happening as it always skips the ampersand and what follows it.</p>
  
  <p>Any help would be appreciated. Thanks!</p>