[wp-trac] [WordPress Trac] #18149: Enhance "Insert/edit link" to predict user's intent

WordPress Trac noreply at wordpress.org
Mon Aug 26 17:00:02 UTC 2013


#18149: Enhance "Insert/edit link" to predict user's intent
-------------------------+------------------------------
 Reporter:  itsalltech1  |       Owner:  azaozz
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Editor       |     Version:  3.1
 Severity:  minor        |  Resolution:
 Keywords:  2nd-opinion  |
-------------------------+------------------------------

Comment (by WraithKenny):

 I think prohibiting "Document relative" links in this particular UI widget
 is the right way to go. If it is needed, it can be added, just not through
 this widget.

 WordPress has a list of approved protocols in the kses somewhere. We could
 use that (or the simpler above js methods) to detect if the link is an
 absolute link, and check for "/" and "#" for root relative links and
 anchor links. If a link is none of those, prepend double "/".

 I would advocate using the double "/" 'protocol relative' linking scheme
 as it effectively does the same thing as grabbing the current protocol,
 except it does it dynamically on the client side. It's more robust,
 dynamic and stable then injecting it into the content.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/18149#comment:50>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list