Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-wiki
Commits
0f02092a
Commit
0f02092a
authored
Jan 24, 2013
by
tschmidt-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added MARKDOWN_SAFE_MODE setting
parent
8ac9814f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
wiki/conf/settings.py
+1
-0
wiki/core/__init__.py
+4
-1
No files found.
wiki/conf/settings.py
View file @
0f02092a
...
...
@@ -14,6 +14,7 @@ WIKI_LANGUAGE = 'markdown'
EDITOR
=
getattr
(
django_settings
,
'WIKI_EDITOR'
,
'wiki.editors.markitup.MarkItUp'
)
MARKDOWN_EXTENSIONS
=
getattr
(
django_settings
,
'WIKI_MARKDOWN_EXTENSIONS'
,
[
'extra'
,
'toc'
]
)
MARKDOWN_SAFE_MODE
=
getattr
(
django_settings
,
'WIKI_MARKDOWN_SAFE_MODE'
,
'remove'
)
# This slug is used in URLPath if an article has been deleted. The children of the
# URLPath of that article are moved to lost and found. They keep their permissions
...
...
wiki/core/__init__.py
View file @
0f02092a
import
markdown
from
wiki.conf
import
settings
class
ArticleMarkdown
(
markdown
.
Markdown
):
def
__init__
(
self
,
article
,
*
args
,
**
kwargs
):
kwargs
[
'safe_mode'
]
=
"remove"
kwargs
[
'safe_mode'
]
=
settings
.
MARKDOWN_SAFE_MODE
markdown
.
Markdown
.
__init__
(
self
,
*
args
,
**
kwargs
)
self
.
article
=
article
...
...
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