Browse Source

change link parsing from quote_plus to quote #12822

Abhimanyu Saharan 2 năm trước cách đây
mục cha
commit
928a34674e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      netbox/extras/models/models.py

+ 1 - 1
netbox/extras/models/models.py

@@ -285,7 +285,7 @@ class CustomLink(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
         text = clean_html(text, allowed_schemes)
         text = clean_html(text, allowed_schemes)
 
 
         # Sanitize link
         # Sanitize link
-        link = urllib.parse.quote_plus(link, safe='/:?&=%+[]@#')
+        link = urllib.parse.quote(link, safe='/:?&=%+[]@#')
 
 
         # Verify link scheme is allowed
         # Verify link scheme is allowed
         result = urllib.parse.urlparse(link)
         result = urllib.parse.urlparse(link)