WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#9805 closed enhancement (duplicate)

a better unhtmlentities()

Reported by: Denis-de-Bernardy Owned by: westi
Milestone: Priority: low
Severity: minor Version: 2.8
Component: Charset Keywords: has-patch tested early
Focuses: Cc:

Description

TinyMCE's Googlespell plugin contains a version of unhtmlentities that looks a little better than the one we currently use in the WP, RSS and Blogware importers.

Attachments (3)

9805.diff (2.0 KB) - added by Denis-de-Bernardy 5 years ago.
9805.2.diff (1.6 KB) - added by Denis-de-Bernardy 5 years ago.
per bforchhammer's suggestion, see #9798
9805.3.patch (5.2 KB) - added by hakre 4 years ago.

Download all attachments as: .zip

Change History (14)

Denis-de-Bernardy5 years ago

comment:1 Denis-de-Bernardy5 years ago

the e regex modifier would probably need to be removed before this gets committed. some testing is in order before it's added either way.

Denis-de-Bernardy5 years ago

per bforchhammer's suggestion, see #9798

comment:2 Denis-de-Bernardy5 years ago

  • Keywords tested commit added; needs-testing removed

importer works fine with patch applied.

comment:3 Denis-de-Bernardy5 years ago

  • Component changed from Import to Charset
  • Keywords needs-testing early added; tested commit removed
  • Milestone changed from 2.8 to 2.9

re-assigning this to early 2.9, however, in case it has unexpected side effects.

comment:4 follow-up: hakre5 years ago

+1 for having the e modifier out there.

strtr() does not look as a fitting function to, this will lead to data-loss. str_replace should do the job instead.

comment:5 in reply to: ↑ 4 hakre5 years ago

Replying to hakre:

strtr() does not look as a fitting function to, this will lead to data-loss. str_replace should do the job instead.

ignore that comment please, it's a mistake of mine.

comment:6 westi5 years ago

  • Owner set to westi
  • Status changed from new to reviewing

comment:7 ryan4 years ago

  • Milestone changed from 2.9 to Future Release

hakre4 years ago

comment:8 hakre4 years ago

  • Keywords tested added; needs-testing removed
  • Milestone changed from Future Release to 3.0

reviewed and tested the patch. works.

while we're at it, there was code duplication between the patched classes so that my patch adds a base_importer class which can be inherited to compact the code.

comment:9 dd324 years ago

Now that we require PHP 4.3, Theres no need at all for those functions.

Suggest closing this ticket in favour of:

#11636: enhancement: Replace unhtmlentities() methods in three importers

comment:10 nacin4 years ago

  • Resolution set to duplicate
  • Status changed from reviewing to closed

Patch in #11636.

comment:11 nacin4 years ago

  • Milestone 3.0 deleted
Note: See TracTickets for help on using tickets.