Skip to main content

Bug Tracker

Side navigation

#9439 closed enhancement (duplicate)

Opened May 27, 2011 07:44AM UTC

Closed May 27, 2011 04:08PM UTC

Last modified May 27, 2011 04:08PM UTC

Better definition for jq escaping script

Reported by: ottuzzi Owned by:
Priority: low Milestone:
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


on page[1] you can see the proposed jq script to escape period and colon characters as they are problematic as css selectors: I found that even $,{ and } need to be correctly escaped.

Here is the proposed change:

function jq(myId) {
   return '#' + myId.replace(/(:|\\.|\\{|\\}|\\$)/g,'\\\\$1');

Please let me know what you think about this change.





Attachments (0)
Change History (2)

Changed May 27, 2011 04:08PM UTC by rwaldron comment:1

component: unfiledselector
priority: undecidedlow
resolution: → duplicate
status: newclosed

Changed May 27, 2011 04:08PM UTC by rwaldron comment:2

Duplicate of #5241.