Skip to main content
2 of 2
edited tags
balpha StaffMod
  • 158.9k
  • 45
  • 506
  • 679

Auto escape URL when entering with hyperlink button (Ctrl+L)

Whenever the following characters appear in an URL in a link of the form [foo][1] … [1]: http://..., the server won't parse it as URL:

  • ^, {, }, \

and the following won't work in preview:

  • $, ^, *, [, ], {, }, \, ', "

This causes great trouble when copying links from the URL bar. Browsers seldom escape every character, e.g. in Firefox ~!^*_-{}|[]\. in a query string will not be escaped, while in Chrome ``~!$^*()_-{}|[]:;',./won't be escaped. For example, [all 3 Wolfram Alpha links by this user](http://math.stackexchange.com/posts/1911/revisions) fails to appear because of^, {and}`. Fixing these links are annoying.

Therefore, I propose that when one creates a link or image through the toolbar (Ctrl+L / Ctrl+G), the system should be able to escape at least the above mentioned characters.

kennytm
  • 9.2k
  • 34
  • 54