Some hyperlinks are broken by saving the post
|Reported by:||vladsharp||Owned by:||anonymous|
|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:
- In HTML editor mode (Visual Editor enabled in settings though):
<a href="http://google.com">test</a>works as expected.
<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.
<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)
<a href="http://google.com" title="Other">test</a>works as expected.
- In Visual editor mode:
- 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.
- Input: As step 2.a. but also and set the link's target - target is ignored upon save (as expected).
- 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.
- Create a new post in the Visual Editor (to make things simple):
test Google testthen 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="<br"></a> "http://www.google.com">Google test
- Input: Type
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).