Make WordPress Core

Opened 16 years ago

Closed 13 years ago

Last modified 11 years ago

#4152 closed defect (bug) (fixed)

posts_nav_link does not detect all html entities

Reported by: jimmyk's profile jimmyk Owned by:
Milestone: 3.0 Priority: low
Severity: normal Version: 2.1.3
Component: Template Keywords: needs-patch
Focuses: Cc:

Description

the nav link functions do not properly handle html entities with uppercase letters.

Attachments (1)

entities.patch (1.1 KB) - added by jimmyk 16 years ago.
patch to fix bug

Download all attachments as: .zip

Change History (14)

@jimmyk
16 years ago

patch to fix bug

#1 @djr
15 years ago

  • Keywords has-patch added

#2 @thee17
15 years ago

  • Milestone changed from 2.5 to 2.6

#3 @Denis-de-Bernardy
14 years ago

  • Keywords needs-patch added; has-patch removed

#4 @hakre
14 years ago

Funny that this did not get fixed earlier. I'll create a patch against current now.

#5 @hakre
14 years ago

There is a related bug, if you put the entity Ä into a post's title, template tags are not able to handle it properly.   did work for me in another test. This is defenetly broken and not an isolated Issue.

#6 @hakre
14 years ago

I suggest to have this closed as wontfix. The problems are overwhelming but as overwhelming as the problems are, is the data-flow in the core-design is full of deficiencies making it near impossible to fix it. Please try yourself using the following char-sequnces in the title (enter them as those into your post editor in the backend, not directly into the database);

Holla the woodfairy is pressing inside the forrest with her friends  , Ä and ä joining the party.

#7 @hakre
14 years ago

Additionally for those who want to test, this little snippet helped me to digg a bit into it:

	if ( !array_key_exists('htmlspecialchars', $GLOBALS['wp_filter']['the_title']) )
		add_filter('the_title', 'htmlspecialchars', 0, 1);

#8 @hakre
14 years ago

Versus: #4893

#9 @ryan
14 years ago

  • Milestone changed from 2.9 to 3.0

#10 @dd32
13 years ago

From what I can see here, none of the entities mentioned in this ticket are related to the bug at all.

The code in question appears to be to pick up invalid html entities, At present, any html entities with A-Z after the first character are wiped out.

Example: Ð will be replaced with Ð whereas ð would pass straight through as expected. Ä also passes through as expected as the capital is in the first position.

I do not see a problem with changing this to a case-insensitive regular expression.

#11 @dd32
13 years ago

  • Component changed from Administration to Template

#12 @dd32
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13922]) Handle uppercase html entities in get_next_posts_link() & get_next_comments_link() (and family) $labels. Fixes #4152

#13 @duck_
11 years ago

In [20537]:

Handle uppercase HTML entities in get_previous_posts_link(). Props ounziw. See #4152, fixes #19803.

Note: See TracTickets for help on using tickets.