mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Replace slashes globally
This commit is contained in:
parent
6d10c186ad
commit
488f33d3d0
2 changed files with 7 additions and 7 deletions
|
@ -77,13 +77,13 @@ block content
|
||||||
|
|
||||||
script(src='/socket.io/socket.io.js')
|
script(src='/socket.io/socket.io.js')
|
||||||
|
|
||||||
//- We need to do .replace(/\//, '\\/') do that '</script>' -> '<\/script>'
|
//- We need to do .replace(/\//g, '\\/') do that '</script>' -> '<\/script>'
|
||||||
//- and doesn't prematurely end the script tag.
|
//- and doesn't prematurely end the script tag.
|
||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
window.project_id = "!{project_id}"
|
window.project_id = "!{project_id}"
|
||||||
window.sharelatex = !{JSON.stringify(sharelatex).replace(/\//, '\\/')};
|
window.sharelatex = !{JSON.stringify(sharelatex).replace(/\//g, '\\/')};
|
||||||
window.userSettings = !{JSON.stringify(userSettings).replace(/\//, '\\/')};
|
window.userSettings = !{JSON.stringify(userSettings).replace(/\//g, '\\/')};
|
||||||
window.user = !{JSON.stringify(user).replace(/\//, '\\/')};
|
window.user = !{JSON.stringify(user).replace(/\//g, '\\/')};
|
||||||
window.csrfToken = "!{csrfToken}";
|
window.csrfToken = "!{csrfToken}";
|
||||||
window.requirejs = {
|
window.requirejs = {
|
||||||
"paths" : {
|
"paths" : {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
extends ../layout
|
extends ../layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
//- We need to do .replace(/\//, '\\/') do that '</script>' -> '<\/script>'
|
//- We need to do .replace(/\//g, '\\/') do that '</script>' -> '<\/script>'
|
||||||
//- and doesn't prematurely end the script tag.
|
//- and doesn't prematurely end the script tag.
|
||||||
script(type="text/javascript").
|
script(type="text/javascript").
|
||||||
window.data = {
|
window.data = {
|
||||||
projects: !{JSON.stringify(projects).replace(/\//, '\\/')},
|
projects: !{JSON.stringify(projects).replace(/\//g, '\\/')},
|
||||||
tags: !{JSON.stringify(tags).replace(/\//, '\\/')}
|
tags: !{JSON.stringify(tags).replace(/\//g, '\\/')}
|
||||||
};
|
};
|
||||||
window.algolia = {
|
window.algolia = {
|
||||||
institutions: {
|
institutions: {
|
||||||
|
|
Loading…
Reference in a new issue