Closed Bug 1053834 Opened 10 years ago Closed 10 years ago

Wrong regular expressions in build/shared-utils.js and build/webapp-shared.js

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: max, Assigned: yurenju)

Details

Attachments

(1 file)

This regular expression on line 53 of file build/shared-utils.js (https://github.com/mozilla-b2g/gaia/blob/master/build/shared-utils.js#L53) looks  wrong (note the brackets, making this a character class):

  /[^(\.js)|(\.html)]$/

Another regular expression on line 323 of file build/webapp-shared.js (https://github.com/mozilla-b2g/gaia/blob/master/build/webapp-shared.js#L323) also looks suspicious:

  /<(?:script|link).+=['"]\.?\.?\/?shared\/([^\/]+)\/([^''\s]+)("|')/g

I assume the second character class isn't supposed to contain "'" twice?
thanks for reporting these issues! take it.
Assignee: nobody → yurenju.mozilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 8474399 [details] [review]
github PR: https://github.com/mozilla-b2g/gaia/pull/22976

Thanks! r=gduan
please also modify getSharedStyles part.
Attachment #8474399 - Flags: review?(gduan) → review+
merged.

https://github.com/mozilla-b2g/gaia/commit/fd73715fac069bc263101fdbf235d07dee41daeb
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: