WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#34063 closed enhancement (fixed)

Allow bdo tag through wp_kses()

Reported by: iandunn Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.0
Component: Security Keywords: has-patch
Focuses: rtl Cc:

Description

The bdo tag provides a semantic-free method for switching text-direction within a single page. e.g.,

<p>This text will go left to right.</p>
<p><bdo dir="rtl">This text will go right to left.</bdo></p>

Support for it was silently added in r2896, and then removed without much justification in r2924.

I think there are valid use cases for the tag, and don't see any reason to prevent people from using it.

Attachments (1)

34063.diff (363 bytes) - added by iandunn 4 years ago.

Download all attachments as: .zip

Change History (5)

@iandunn
4 years ago

#1 @iandunn
4 years ago

After reading more, it seems like <div dir="rtl"> is the better way to handle the uses cases I was thinking of, and it's already allowed. <bdo> is intended more for edge cases.

It should probably still be allowed, but is much less of an issue than I originally thought.

#2 @iandunn
4 years ago

  • Keywords has-patch added

#3 @wonderboymusic
4 years ago

  • Milestone changed from Awaiting Review to 4.4

#4 @wonderboymusic
4 years ago

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

In 35141:

KSES: have you ever heard of the <bdo> HTML tag? Same. http://www.w3schools.com/tags/tag_bdo.asp

Adds unit test.

Props iandunn.
Fixes #34063.

Note: See TracTickets for help on using tickets.