Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#20503 closed defect (bug) (fixed)

Special Z characters are either erased or mis-substituted

Reported by: namely's profile Namely Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: major Version: 3.3.1
Component: Formatting Keywords: has-patch commit
Focuses: Cc:

Description

Function convert_chars defined in wp-includes/formatting.php and used in many filters in wp-includes/default-filters.php does not handle two characters properly.

The subjects are two special Z characters: "Ž" and "ž".

convert_chars performs the following replacements:

	$wp_htmltranswinuni = array(
...
	'Ž' => 'ž',
...
	'ž' => '',
...

This lower-cases "Ž" to "ž" and also erases "ž".

Instead, the code should be as follows:

	$wp_htmltranswinuni = array(
...
	'Ž' => 'Ž',
...
	'ž' => 'ž',
...

Attachments (1)

20503.patch (561 bytes) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
13 years ago

  • Milestone changed from Awaiting Review to 3.4

That's a valid change indeed.

0x8E	0x017D	#LATIN CAPITAL LETTER Z WITH CARON
0x9E	0x017E	#LATIN SMALL LETTER Z WITH CARON

http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT

Unit test: [UT694]

#2 @nacin
13 years ago

  • Keywords commit added

#3 @nacin
13 years ago

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

In [20653]:

Properly convert two special Z characters in convert_chars(). props Namely, SergeyBiryukov. fixes #20503.

Note: See TracTickets for help on using tickets.