Bug Tracker

Modify

Ticket #7082 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Manipulation test incorrectly failing for old Webkit based Browsers

Reported by: jitter Owned by:
Priority: low Milestone: 1.4.3
Component: manipulation Version: 1.4.2
Keywords: manipulation webkit regex Cc:
Blocking: Blocked by:

Description

The manipulation test which checks if &#...; encoded entities are encoded properly, fails incorrectly for old Webkit based browsers.

These browsers properly encode the   (the innerHTML-property is set to a 1-character string which has charCode 160).

But this manipulation test is shown as failing for old Webkit browsers.

This has to do with an old Webkit-Bug (which is fixed since around spring 2009). In those older builds Webkit returned false for this simple test

  /\s/.test('\xA0')

as Webkit failed to match   with the \s character class escape.

I verified this for Safari 3.1.2 (525.21), Safari 3.2.3 (525.29), iPhone Safari 2.2.1 (Webkit 525.18.1) and S60 5.0 Browser (Webkit 525). But all browsers using those older Webkit versions are affected (Chrome < 2.x, ...)

So I guess changing the Regex-Test in Line 902 of test/unit/manipulations.js from

    /^\s$|^&nbsp;$/.test( space )

to

    /^\xA0$|^&nbsp;$/.test( space )

should fix this false-positive.

Change History

comment:1 Changed 3 years ago by john

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.