WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#20503 closed defect (bug) (fixed)

Special Z characters are either erased or mis-substituted

Reported by: Namely Owned by: 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 3 years ago.

Download all attachments as: .zip

Change History (4)

@SergeyBiryukov3 years ago

comment:1 @SergeyBiryukov3 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]

comment:2 @nacin3 years ago

  • Keywords commit added

comment:3 @nacin3 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.