Skip to content

Commit 1e00258

Browse files
Merge pull request #623 from Crozzers/allow-plus-sign-in-urls
Don't escape plus signs in URLs (#621)
2 parents 5a2b945 + 463b7b5 commit 1e00258

File tree

5 files changed

+4
-2
lines changed

5 files changed

+4
-2
lines changed

Diff for: CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- [pull #617] Add MarkdownFileLinks extra (#528)
66
- [pull #622] Add missing block tags to regex (#620)
7+
- [pull #623] Don't escape plus signs in URLs (#621)
78

89

910
## python-markdown2 2.5.3

Diff for: lib/markdown2.py

-2
Original file line numberDiff line numberDiff line change
@@ -4099,8 +4099,6 @@ def _html_escape_url(
40994099
.replace('<', '&lt;')
41004100
.replace('>', '&gt;'))
41014101
if safe_mode:
4102-
if charset != 'base64':
4103-
escaped = escaped.replace('+', ' ')
41044102
escaped = escaped.replace("'", "&#39;")
41054103
return escaped
41064104

Diff for: test/tm-cases/safe_mode_issue621.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p><a href="https://chromium.googlesource.com/v8/v8.git/+/refs/heads/beta">Chromium</a></p>

Diff for: test/tm-cases/safe_mode_issue621.opts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{'safe_mode': 'escape'}

Diff for: test/tm-cases/safe_mode_issue621.text

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[Chromium](https://chromium.googlesource.com/v8/v8.git/+/refs/heads/beta)

0 commit comments

Comments
 (0)