Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7082 closed bug (fixed)

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:
Blocked by: Blocking:

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 (1)

comment:1 Changed 9 years ago by john

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.