WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#16765 closed defect (bug) (worksforme)

There's a problem to show one letter

Reported by: maorb Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.5
Component: Charset Keywords:
Focuses: Cc:

Description

I recently encountered again a problem with the Hebrew letter "Nun" (Ascii: 144, unicode: 05e0, html entity - נ)
Such a prolem with this letter was a year ago in 2.9, and is also referred in ticket
#11669
The issue is currently in contact form7, when there is a checkbox input and the value contains the letter "nun".
It is saved to the db ok, but being pulled not ok and appear to be fitered out and causing the whole checkbox to be filtered out and not shown.
In previous WP versions it was ok, so I think that some of the last filtering changes in the 3.0.1-3.0.5 may cause this.
I don't know if this affects more places, but this one I have encountered.

Change History (6)

#1 @hakre
9 years ago

Can you please specify the operating system of the server where the blog is running and the PHP version?

#2 @hakre
9 years ago

  • Keywords reporter-feedback added

#3 @maorb
9 years ago

Meanwhile I encountered this today on a dev server which is under XAMPP1.7.3 on Win XP-SP3.
Apache is Apache/2.2.14, PHP 5.3.1 and MySQL 5.1.41.
I will later try to see if this is happening also on a web server under real Linux machine, and report here.

#4 @maorb
9 years ago

It appears that on a Linux/Apache real web machine the problem does not reproduce, right now it is only on local XAMPP on XP machine.
But, prior to 3.0.4 it was ok also on local XAMPP.

#5 @edwardw
9 years ago

  • Keywords reporter-feedback removed
  • Resolution set to worksforme
  • Status changed from new to closed

Seems to be fine as of SVN trunk revision 18974.

#6 in reply to: ↑ description @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted

Replying to maorb:

The issue is currently in contact form7, when there is a checkbox input and the value contains the letter "nun".
It is saved to the db ok, but being pulled not ok and appear to be fitered out and causing the whole checkbox to be filtered out and not shown.

Turned out to be a Contact Form 7 issue. Cyrillic characters are filtered out too.

Similar to [12501], the regular expression in contact-form-7/includes/shortcodes.php:

$attr = trim( preg_replace( '/\s+/', ' ', $m[3] ) );

needs to be replaced with:

$attr = trim( preg_replace( '/[\r\n\t ]+/', ' ', $m[3] ) );
Note: See TracTickets for help on using tickets.