[wp-trac] [WordPress Trac] #7370: Some hyperlinks are broken by saving the post

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 21 23:36:36 GMT 2008


#7370: Some hyperlinks are broken by saving the post
-----------------------+----------------------------------------------------
 Reporter:  vladsharp  |       Owner:  anonymous           
     Type:  defect     |      Status:  new                 
 Priority:  high       |   Milestone:  2.6.1               
Component:  General    |     Version:  2.6                 
 Severity:  critical   |    Keywords:  links, visual editor
-----------------------+----------------------------------------------------
 When adding a link to a post, sometimes the link is shown incorrectly in
 the editor (after a save). Wordpress 2.6, with plugins installed (Akismet,
 Easy Tube, flickrRSS, Flutter, Most Commented, Popularity Contest) and the
 default (Kubrick) theme.

 Here are the different cases tried:

 1. In HTML editor mode (Visual Editor enabled in settings though):
    a. Input:
     {{{
 <a href="http://google.com">test</a>
     }}}
     works as expected.
    b. Input:
     {{{
 <a href="http://google.com" target="_blank">test</a>
     }}}
     yields the following (after saving):
     {{{
 <a href="http://google.com">test</a>
     }}}
     i.e. the target is ignored.

    c. Input:
     {{{
 <a href="http://google.com" title="Hello" target="_blank">test</a>
     }}}
     yields the following:
     {{{
 <a href="http://google.com" title="Hello">test</a>
     }}}
     and saving again does not change anything. (the target is ignored
 again)
    d. Input:
     {{{
 <a href="http://google.com" title="Other">test</a>
     }}}
     works as expected.
 2. In Visual editor mode:
   a. Input:
      Type in the text "Google", select it with the mouse, add a new
 hyperlink, only using the field for the actual link. Saving the post leads
 to correct behaviour.
   b. Input:
      As step 2.a. but also and set the link's target - target is ignored
 upon save (as expected).
   c. Input:
      As step 2.a. but also add a title to the link ("Hello") - title is
 correctly updated.

 So far, so good. The only thing not working is the target="" for <a> tags.
 3. Create a new post in the Visual Editor (to make things simple):
   a. Input:
      Type
 {{{
 test Google test
 }}}
      then select the text Google, make it into a link, and add a new
 window target as well as the title "Something hello". The result after
 saving the post is (viewing the HTML):
 {{{
 test <a title="Google something" href="&lt;br"></a>
 "http://www.google.com"&gt;Google test
 }}}

 It appears in this case, the tag was somehow confused by the POST handler
 for the saving of the post, and it decided to quote certain things. (My
 usage of POST is the HTTP POST). (As per usual, the target is being
 ignored here).

 Not sure where this is going wrong, but this should definitely be fixed in
 2.6.1 (upon verification).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7370>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list