Opened 3 years ago

Last modified 2 years ago

#12056 new defect (bug)

target="_blank" being stripped from Profile Bio and Category Description

Reported by: lovewpmu Owned by:
Priority: normal Milestone: Future Release
Component: General Version: 2.9.2
Severity: normal Keywords: gsoc
Cc:

Description

Many apologies if this is a duplicate. I have searched but did not find it yet posted.

I noticed that target="_blank" is being stripped from my "a href" tags my profile "Biographical Info" field even though the "a href" with the URL and closing tag still remain. It happens every time I save my profile.

This was independently verified.

It is a regular wordpress install running 2.9.1 (not wordpressmu, etc.).

My original thread can be found here:
http://wordpress.org/support/topic/355388?replies=1

Change History (9)

The target attribute is still valid as of XHTML 1.0 Transitional, but you will probably have to use onclick instead. Probably neither are allowed to non-administrators.

there is no reason why someone who is filling out their bio with links to the relevant online info should need to code in javascript. in fact, most people using wordpress -- ie. the common user -- probably cannot. i believe the links on the HTML generated for posts, _blank is used for the "Open in New Window" option.

this should be standardized and completely independent from whether one is or is not an administrator.

It does seem to be using the same filters for admins. That's a bit surprising.

It's set up as a default filter for pre_user_description so you could override that with a plugin.

You might have a case for enabling unfiltered bios for administrators, but beyond that I think the "it's allowed in posts" argument isn't going to fly. WordPress explicitly filters bios the same way as comments instead of posts.

  • Milestone changed from 2.9.2 to Future Release
  • Cc bsutcliffe added
  • Keywords html, strip, profile bio, category description, link target added
  • Summary changed from target="_blank" being stripped from Profile Bio to target="_blank" being stripped from Profile Bio and Category Description
  • Version set to 2.9.2

This also occurs in category descriptions. If I add a link to one of my category descriptions and specify target="_blank", the target reference gets stripped out when saving. Unlike bios, this filter definitely should not be applied.

  • Cc bsutcliffe removed
  • Keywords html, strip, profile bio, category description, link target removed
  • Keywords gsoc added

Images, lists and class specifications are also being stripped away from category descriptions. What is the reasoning for being so strict with category descriptions?

Note: See TracTickets for help on using tickets.