Skip to content

Commit

Permalink
Fix #20 - Update MACHINA_MARKUP_LANGUAGE markdown function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ellmetha committed Jun 4, 2016
1 parent 66f939a commit 86d90fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Django-machina 0.2
:maxdepth: 1

v0.2
v0.2.1
15 changes: 15 additions & 0 deletions docs/release_notes/v0.2.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
################################
Django-machina 0.3 release notes
################################

Requirements and compatibility
------------------------------

Python 2.7, 3.3, 3.4 and 3.5. Django 1.8 and 1.9.

Minor changes
-------------

* Fixed a security issue related to the usage of *django-markdown*'s ``markdown`` function (`#20`_)

.. _`#20`: https://github.com/ellmetha/django-machina/issues/20
2 changes: 1 addition & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The forum name.
``MACHINA_MARKUP_LANGUAGE``
---------------------------

Default: ``('django_markdown.utils.markdown', {})``
Default: ``('django_markdown.utils.markdown', {'safe': True})``

This setting defines how posts content is translated into HTML on the forum. It should be a two-tuple. The first element should be a string corresponding to the Python dotted path to a function returning HTML from a content expressed in a markup language. The second element of the tuple is a dictionary of keyword arguments to pass to the latest function (the dictionary should be empty if the function does not require any argument). Note that if you do not want to use a markup language such as Markdown or BBCode (eg. if you are using a Wysiwyg editor), you can set this setting to ``None``.

Expand Down
2 changes: 1 addition & 1 deletion machina/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# General
MACHINA_FORUM_NAME = getattr(settings, 'MACHINA_FORUM_NAME', 'Machina')
MACHINA_MARKUP_LANGUAGE = getattr(
settings, 'MACHINA_MARKUP_LANGUAGE', ('django_markdown.utils.markdown', {}))
settings, 'MACHINA_MARKUP_LANGUAGE', ('django_markdown.utils.markdown', {'safe': True}))
MACHINA_MARKUP_WIDGET = getattr(
settings, 'MACHINA_MARKUP_WIDGET', 'django_markdown.widgets.MarkdownWidget')

Expand Down

0 comments on commit 86d90fb

Please sign in to comment.