Commit graph

113 commits

Author SHA1 Message Date
881b659560 remove escaping of variable values as it is handled by jinja2 since at least 2.10 2021-05-17 15:45:38 +02:00
Jan Breuer
7574963bdd Fix issue #50
Remove unnecesery line breaks generation
Deeply traverse tag code and replace all \n by tag text:line-break
2017-09-29 23:31:23 +02:00
ak04nv
77f5dec68b fixed if statement 2017-09-24 22:23:11 +08:00
ak04nv
aecd401c6e fixed #47 issue 2017-09-23 23:56:26 +08:00
Christopher Ramírez
70488d23de It's not longer required for template designer to mark a markdown filter output as safe. 2017-09-19 15:16:17 -06:00
Christopher Ramírez
ffba32baed Rename global variable. 2017-09-19 14:58:01 -06:00
Christopher Ramírez
59acc0fa9c Removing extra line. 2017-09-19 14:57:21 -06:00
Christopher Ramírez
ffe27a7a62 Fix Secretary._unescape_links implementation failing on >=Py3. 2017-09-19 14:57:06 -06:00
Christopher Ramírez
076067c350 Renderer._unescape_links now returns link variable parts wrapped in Markup instances.
This change avoids accidental escaping of URLs that can be done by the Renderer.finalize_value postprocessor.
2017-09-06 17:18:39 -06:00
Christopher Ramírez
47207c76ca Merge branch 'master' of github.com:christopher-ramirez/secretary 2017-09-01 15:10:34 -06:00
Christopher Ramírez
76cb15e2ba Introducing new and faster technique to escape variables values. 2017-09-01 15:08:24 -06:00
Christopher
feabe1dc3c FIx unresolved merge conflic. 2017-08-08 20:52:07 -06:00
Christopher
3bb25820a0 Merge branch 'master' of github.com:christopher-ramirez/secretary 2017-08-08 20:46:47 -06:00
Christopher Ramírez
f74046fb09 Fix bug storing mimefiles. 2017-07-14 12:11:40 -06:00
xsetra
647f5b4f67 typing error, edited. 2017-07-13 10:01:52 +03:00
xsetra
cf7489a1c0 _pack_document() method changed. ODT files have to start mimetype with non-zipped 2017-07-13 09:47:25 +03:00
Christopher Ramírez
3d2cedeec8 Fix #39.
Introducing new tests for _encode_escape_chars.
2017-06-12 12:54:40 -06:00
Christopher Ramírez
96ceaf41f1 Fix #34
Automatically unescape URIs whose scheme is "secretary".
2017-02-13 11:22:22 -06:00
Christopher Ramírez
a827b28f48 Fix #33
Check for existance of variable "result" when handling ExpatError exception.
2017-02-13 08:38:25 -06:00
Christopher Ramírez
3f0b97ac64 Fix syntax error. 2016-11-04 11:12:27 -06:00
Christopher Ramírez
5f30fc93bf Fix an issue with previous markdown fix.
Previous fix was only keeping the last text node found in a list element.
2016-11-04 11:03:50 -06:00
Christopher Ramírez
e17d03ecae Fix issue reported in #30.
Contents of <li> elements most be wrapped inside a container like <p>.
This container is not automatically created by markdown2 unless the
list items are explicitly separated with double linebreaks.

The above issue was generating documents with invisible list items in
LibreOffice.
2016-11-03 12:27:30 -06:00
Christopher
6033d805f3 Add chars \r, \x0b and \x0c to scaped chars. 2016-06-04 11:51:35 -06:00
Christopher Ramírez
5f87065c19 Repair bug introduced in 7244e87. 2016-04-15 12:07:01 -06:00
Christopher Ramírez
7699c83797 Fix passing Py3 bytes object to _unescape_entities. 2016-04-12 14:47:35 -06:00
Christopher Ramírez
c2275e4725 Escape final rendered xml 2016-04-12 12:26:40 -06:00
Christopher Ramírez
8ab2083558 Escape &apos; in Renderer._compile_escape_expressions. 2016-04-12 12:06:30 -06:00
Christopher Ramírez
cccd87e2da Escape &apos; in Renderer._compile_escape_expressions. 2016-04-12 12:05:46 -06:00
Christopher Ramírez
7244e8778e Fix regex in Renderer._compile_escape_expressions. 2016-04-12 12:00:40 -06:00
Christopher Ramírez
eee5e43549 Simplifies ascii encoding of rendered xml. 2016-04-12 11:59:58 -06:00
Christopher
83561e94d5 _is_jinja_tag and _is_block_tag were returning the result of RE.findall instead of a boolean. 2015-12-27 08:59:47 -06:00
Christopher
4a3ecebeb8 _census_tags instead of using _is_block_tag, it was using old code to determinate if a tag was a block tag. 2015-12-27 08:57:54 -06:00
Christopher
2a7128c9ab Update Renderer docstring. 2015-12-21 12:03:54 -06:00
Christopher
641f0dc05c Update module docstring. 2015-12-21 11:54:06 -06:00
Christopher
6035736c32 Update license. 2015-12-21 11:51:22 -06:00
Christopher
3a2b4b9c3b Reimplement _unescape_entities routine.
</?text:s.*?> entities are not longer escaped.
This functionallity was used when secretary handled plain text
jinja instructions. This now is no longer supported since the
official method to add instructions is through input fields.
2015-12-21 11:29:41 -06:00
Christopher Ramírez
5daa1a2c2b Secretary now handles custom jinja tags ending and starting strings. 2015-12-17 16:15:12 -06:00
Christopher
036d339e70 Refactor _prepare_template_tags routine. 2015-12-16 22:19:24 -06:00
Christopher Ramírez
1e77732d5a Fix #25 2015-12-04 09:03:25 -06:00
Christopher Ramírez
2896491e79 Fix critical issues in regexs used by _unescape_entities function. 2015-05-13 10:27:46 -06:00
Christopher Ramírez
ea2cc534a2 Fix wrong regexp used to unscape xml entities inside jinja tags. 2015-05-11 13:53:06 -06:00
Christopher Ramírez
0f6c0eb172 Fix #20. 2015-05-08 12:30:17 -06:00
Christopher Ramírez
7fd4bdbc26 Fix reading 'major' property on Python 2.6. 2015-05-08 12:25:26 -06:00
Anton Kochnev
1825995c4d fixed xrange issue in py3 2015-05-07 16:02:37 +08:00
Christopher Ramírez
ca59592ff7 Fixs #16. 2015-04-29 16:31:15 -06:00
Christopher Ramírez
d6abc37ccb Make ajustments in PR #15. For now leaving #16 open. This fixes #14, and closes #15. 2015-04-29 11:54:35 -06:00
Dieter Buys
1cffe9f224 Text style tags are now properly stripped from template elements 2015-04-27 17:45:18 -07:00
Dieter Buys
d84266182a Fix for mishandled " and & characters 2015-04-27 16:29:26 -07:00
Christopher Ramírez
cb60f1ee0b Fix UnicodeEncodeError bug. 2015-04-13 11:50:40 -06:00
Christopher Ramírez
088b93e77e Fix issue #12 2015-02-03 16:18:44 -06:00