[wp-trac] [WordPress Trac] #11699: adjacent_post_link fails to strip anchor tags from post titles
WordPress Trac
wp-trac at lists.automattic.com
Mon May 3 17:15:41 UTC 2010
#11699: adjacent_post_link fails to strip anchor tags from post titles
--------------------------+-------------------------------------------------
Reporter: jaylett | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Template | Version: 2.9
Severity: normal | Keywords: has-patch dev-feedback
--------------------------+-------------------------------------------------
Comment(by jaylett):
I'm firmly of the opinion that unless you can 100% guarantee that your
invariant is going to be honoured everywhere, you should sanitise output
as well as anything you do to the input.
Given the number of tools available for frobbing the wordpress database
directly (including but by no means limited to import scripts to get you
up and running from another system such as Drupal), an invariant such as
"titles must not contain HTML tags" simply isn't going to be honoured.
On top of this I don't believe that ruling out having tags in a title
simply because it's a pain is a good decision. (Indeed, it would prejudice
me against Wordpress just when I was getting to like it.) What's the user-
focussed justification here for removing the ability to put emphasis in a
title, for instance?
(Removing links in titles on input I could live with, just about.)
So +1 on filters, and +1 on stripping tags, providing it gets documented
clearly as an invariant of the data model.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11699#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list