Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10157 closed defect (fixed)

URI validation in LinkDialog is overly restrictive

Reported by: Jared Jurkiewicz Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.4
Component: Editor Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description

URI validation in LinkDialog? is overly restrictive

This came in from a co-worker. The fragment validation is failing on characters valid in fragments. Virtually anything is valid in a fragment, including / and ?, according to:

http://labs.apache.org/webarch/uri/rfc/rfc3986.html#fragment

So the fragment validation should probably just be:

#.*

Instead of #[A-Za-z][
w:-]*

I also checked that the hash does come back correctly with /, ?, etc, in it (location.hash)

Change History (3)

comment:1 Changed 10 years ago by Jared Jurkiewicz

Also, characters like ' in the url (or alt text), have problems, so need to adjust how templates are updated. Need to encode those.

comment:2 Changed 10 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

(In [20620]) Minor tweaks to LinkDialog? to get it to behave better. fixes #10157

comment:3 Changed 10 years ago by Jared Jurkiewicz

(In [20640]) Removing console.log. refs #10157

Note: See TracTickets for help on using tickets.