Skip to content

Commit 40c6b17

Browse files
committed
Fixes #7981: Fix Markdown sanitization regex
1 parent 7cb9ced commit 40c6b17

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/release-notes/version-3.0.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
### Enhancements
66

77
* [#7751](https://github.com/netbox-community/netbox/issues/7751) - Get API user from LDAP only when `FIND_GROUP_PERMS` is enabled
8-
* [#7823](https://github.com/netbox-community/netbox/issues/7823) - Fix issue where `return_url` is not honored when 'Save & Continue' button is present
98
* [#7885](https://github.com/netbox-community/netbox/issues/7885) - Linkify VLAN name in VLANs table
109
* [#7892](https://github.com/netbox-community/netbox/issues/7892) - Add L22-30 power port & outlet types
1110
* [#7932](https://github.com/netbox-community/netbox/issues/7932) - Improve performance of the "quick find" function
1211
* [#7941](https://github.com/netbox-community/netbox/issues/7941) - Add multi-standard ITA power outlet type
1312

13+
### Bug Fixes
14+
15+
* [#7823](https://github.com/netbox-community/netbox/issues/7823) - Fix issue where `return_url` is not honored when 'Save & Continue' button is present
16+
* [#7981](https://github.com/netbox-community/netbox/issues/7981) - Fix Markdown sanitization regex
17+
1418
---
1519

1620
## v3.0.11 (2021-11-24)

netbox/utilities/templatetags/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def render_markdown(value):
5151
value = re.sub(pattern, '[\\1](\\3)', value, flags=re.IGNORECASE)
5252

5353
# Sanitize Markdown reference links
54-
pattern = fr'\[(.+)\]:\w?(?!({schemes})).*:(.+)'
54+
pattern = fr'\[(.+)\]:\s*(?!({schemes}))\w*:(.+)'
5555
value = re.sub(pattern, '[\\1]: \\3', value, flags=re.IGNORECASE)
5656

5757
# Render Markdown

0 commit comments

Comments
 (0)