Backslashing 2017-03-30 gives 7-03-30 Javascript : I am trying to output the current page URL for Disqus comments. Since my page URL structure is like: 

    https://www.example.com/post/1234/2017-03-30/

I am having a little issue with backslahing.

I don't know if this has been asked before, I tried searching for reasonable answer but couldn't find any. I am trying to backslash date, since including it like 2017-03-30 will only subtract it. 

This is the PHP code that outputs Javascript:

    echo 'this.page.url = "https://www.example.com/post/'. $id . '/\\'. $date . '\\/";';

This is the output:

    this.page.url = "https://www.example.com/post/1234/\2017-03-30\/";

But the problem is Disqus will show the URL like:

    https://www.example.com/post/1234/7-03-30

I know the problem is with \201 but what I don't know is how to fix it. I tried different ways. Nothing seems to be working. I am pretty much lost here. :/