itizawa 5 лет назад
Родитель
Сommit
e22f5f8906

+ 1 - 1
src/client/js/services/PageContainer.js

@@ -31,7 +31,7 @@ export default class PageContainer extends Container {
     }
 
     const revisionId = mainContent.getAttribute('data-page-revision-id');
-    const path = mainContent.getAttribute('data-path');
+    const path = decodeURI(mainContent.getAttribute('data-path'));
 
     this.state = {
       // local page data

+ 1 - 1
src/server/views/widget/page_content.html

@@ -1,6 +1,6 @@
 {% if page %}
 <div id="content-main" class="content-main"
-  data-path="{{ page.path | preventXss | escape }}"
+  data-path="{{ encodeURI(page.path) }}"
   data-current-user="{% if user %}{{ user._id.toString() }}{% endif %}"
   data-page-id="{% if page %}{{ page._id.toString() }}{% endif %}"
   data-page-revision-id="{% if revision %}{{ revision._id.toString() }}{% endif %}"