#10858 (css.js regular expressions are incomplete) - jQuery (original) (raw)

New Ticket View Tickets Ticket Graph Roadmap Recent Changes

#10858 closed bug (fixed)

Opened November 22, 2011 05:12PM UTC

Closed December 09, 2011 01:29AM UTC

Last modified March 13, 2012 01:40PM UTC

Reported by: gibson042 Owned by: gibson042
Priority: low Milestone: 1.7.2
Component: css Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

A review of pull request #610 revealed some flaws in css.js regular expressions with respect to CSS number values. They should be extended as follows in order to properly deal with explicit positives and non-integer reals:

rnumpx = /^[-+]?\d*(?:\d|\.\d+)(?:px)?$/i rnumnopx = /^[-+]?\d*(?:\d|\.\d+)(?!px)[^\d\s]+$/i

Test case: http://jsfiddle.net/7XGfE/

Attachments (0) Change History (6)