#6526: Add remove/escape/replace functions to markdown filter ---------------------------------+----------------------------------------- Reporter: taojian | Owner: thomaspurchas Type: New feature | Status: assigned Component: contrib.markup | Version: master Severity: Normal | Resolution: Keywords: markup markdown | Triage Stage: Accepted Has patch: 1 | Needs documentation: 1 Needs tests: 1 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 ---------------------------------+-----------------------------------------
Comment (by thomaspurchas): Replying to [comment:7 lrekucki]: > 1. The patch needs unittests to show that it works correctly. > 2. It needs documentation. Current docs for {{{markup}}} are not very user friendly, but at least the doc string gives you some clue how to use it. Updating the docstring is a minimum. Write proper docs for those template tags for bonus points :) > 3. It needs some more work. My biggest annoyance is {{{markdown.HTML_REMOVED_TEXT}}} - I could live with it's content if it was translatable, but changing it to something more human-friendly is desirable. Also, while there probably are no extensions called "remove", "escape" and "replace" the names are a bit confusing. I propose using something like {{{ {{ text|markdown:"safe=replace,more_extensions" }} }}} instead. lrekucki I have implemented the safe mode setting using {{{ {{ text|markdown:"safe=replace,more_extensions" }} }}} as you suggested, the attached patch also includes some new tests as well. Also if you can still remember could you clarify what you mean by: > My biggest annoyance is {{{markdown.HTML_REMOVED_TEXT}}} - I could live with it's content if it was translatable, but changing it to something more human-friendly is desirable. -- Ticket URL: <https://code.djangoproject.com/ticket/6526#comment:16> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.