Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/web/WebRenderer.C b/src/web/WebRenderer.C
- index 31586da..cdfb151 100644
- --- a/src/web/WebRenderer.C
- +++ b/src/web/WebRenderer.C
- @@ -219,12 +219,12 @@ void WebRenderer::streamRedirectJS(std::ostream& out,
- if (session_.app() && session_.app()->internalPathIsChanged_)
- out << "if (window." << session_.app()->javaScriptClass() << ") "
- << session_.app()->javaScriptClass()
- - << "._p_.setHash('" << session_.app()->internalPath() << "');\n";
- + << "._p_.setHash('" << boost::algorithm::replace_all_copy(session_.app()->internalPath(), "'", "\\'") << "');\n";
- out <<
- "if (window.location.replace)"
- - " window.location.replace('" << redirect << "');"
- + " window.location.replace('" << boost::algorithm::replace_all_copy(redirect, "'", "\\'") << "');"
- "else"
- - " window.location.href='" << redirect << "';\n";
- + " window.location.href='" << boost::algorithm::replace_all_copy(redirect, "'", "\\'") << "';\n";
- }
- void WebRenderer::serveResponse(WebResponse& response)
- @@ -1617,7 +1617,7 @@ void WebRenderer::collectJS(std::ostream* js)
- if (app->internalPathIsChanged_) {
- *js << app->javaScriptClass()
- - << "._p_.setHash('" << app->newInternalPath_ << "');\n";
- + << "._p_.setHash('" << boost::algorithm::replace_all_copy(app->newInternalPath_, "'", "\\'") << "');\n";
- if (!preLearning() && !app->environment().hashInternalPaths())
- session_.setPagePathInfo(app->newInternalPath_);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement