Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
4632330d
Commit
4632330d
authored
Jun 01, 2017
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: HTML + mustache interpolations not escaped properly
parent
f1a516da
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
21 deletions
+20
-21
markdown.js
server/libs/markdown.js
+2
-2
common.json
server/locales/en/common.json
+15
-15
create.pug
server/views/pages/create.pug
+1
-1
edit.pug
server/views/pages/edit.pug
+1
-1
view.pug
server/views/pages/view.pug
+1
-2
No files found.
server/libs/markdown.js
View file @
4632330d
...
...
@@ -25,10 +25,10 @@ var mkdown = md({
try
{
return
'<pre class="hljs"><code>'
+
hljs
.
highlight
(
lang
,
str
,
true
).
value
+
'</code></pre>'
}
catch
(
err
)
{
return
'<pre><code>'
+
str
+
'</code></pre>'
return
'<pre><code>'
+
_
.
escape
(
str
)
+
'</code></pre>'
}
}
return
'<pre><code>'
+
str
+
'</code></pre>'
return
'<pre><code>'
+
_
.
escape
(
str
)
+
'</code></pre>'
}
})
.
use
(
mdEmoji
)
...
...
server/locales/en/common.json
View file @
4632330d
...
...
@@ -17,25 +17,26 @@
},
"nav"
:
{
"account"
:
"Account"
,
"settings"
:
"Settings"
,
"myprofile"
:
"My Profile"
,
"stats"
:
"Stats"
,
"syssettings"
:
"System Settings"
,
"theme"
:
"Color Theme"
,
"users"
:
"Users"
,
"logout"
:
"Logout"
,
"allpages"
:
"All Pages"
,
"create"
:
"Create"
,
"discard"
:
"Discard"
,
"edit"
:
"Edit"
,
"history"
:
"History"
,
"source"
:
"Source"
,
"move"
:
"Move"
,
"allpages"
:
"All Pages"
,
"home"
:
"Home"
,
"login"
:
"Login"
,
"logout"
:
"Logout"
,
"move"
:
"Move"
,
"myprofile"
:
"My Profile"
,
"normalview"
:
"Normal View"
,
"viewlatest"
:
"View Latest"
,
"discard"
:
"Discard"
,
"savechanges"
:
"Save Changes"
,
"savedocument"
:
"Save Document"
"savedocument"
:
"Save Document"
,
"settings"
:
"Settings"
,
"source"
:
"Source"
,
"stats"
:
"Stats"
,
"syssettings"
:
"System Settings"
,
"theme"
:
"Color Theme"
,
"users"
:
"Users"
,
"viewlatest"
:
"View Latest"
},
"welcome"
:
{
"title"
:
"Welcome to your wiki!"
,
...
...
@@ -46,4 +47,4 @@
"source"
:
"Loading source..."
,
"editor"
:
"Loading editor..."
}
}
\ No newline at end of file
}
server/views/pages/create.pug
View file @
4632330d
...
...
@@ -16,7 +16,7 @@ block rootNavRight
block content
editor(inline-template, current-path=pageData.meta.path, v-cloak)
.editor-area
textarea(ref='editorTextArea')= pageData.markdown
textarea(ref='editorTextArea'
, v-pre
)= pageData.markdown
editor-video
editor-codeblock
...
...
server/views/pages/edit.pug
View file @
4632330d
...
...
@@ -16,7 +16,7 @@ block rootNavRight
block content
editor(inline-template, current-path=pageData.meta.path, v-cloak)
.editor-area
textarea(ref='editorTextArea')= pageData.markdown
textarea(ref='editorTextArea'
, v-pre
)= pageData.markdown
editor-video
editor-codeblock
...
...
server/views/pages/view.pug
View file @
4632330d
...
...
@@ -73,12 +73,11 @@ block content
+tocMenu(pageData.tree)
.column
.hero
h1.title#title= pageData.meta.title
if pageData.meta.subtitle
h2.subtitle= pageData.meta.subtitle
.content.mkcontent
.content.mkcontent
(v-pre)
!= pageData.html
modal-create-page(basepath=pageData.meta.path)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment