Closed
Bug 354886
Opened 18 years ago
Closed 18 years ago
implement EXSLT - Regular Expressions module
Categories
(Core :: XSLT, enhancement)
Core
XSLT
Tracking
()
RESOLVED
FIXED
People
(Reporter: myk, Assigned: peterv)
References
Details
Attachments
(2 files, 3 obsolete files)
15.94 KB,
patch
|
sicking
:
review+
sicking
:
superreview+
|
Details | Diff | Splinter Review |
15.94 KB,
patch
|
Details | Diff | Splinter Review |
For some microsummary generators, it would be useful to be able to extract content from plaintext using regular expressions. XPath 2 includes support for regexps, but implementing it would be a lot of work, so in the meantime the EXSLT - Regular Expressions module seems like the simplest way of adding regexp capabilities to XSLT. We should implement it and include it with our XSLT processor.
Depends on: 348642
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Comment 2•18 years ago
|
||
Assignee: xslt → peterv
Attachment #240731 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #240856 -
Flags: superreview?(bugmail)
Attachment #240856 -
Flags: review?(bugmail)
btw, i was holding off reviewing this until bug 193678 is in since there was some overlap.
Assignee | ||
Comment 4•18 years ago
|
||
Attachment #240856 -
Attachment is obsolete: true
Attachment #246116 -
Flags: superreview?(bugmail)
Attachment #246116 -
Flags: review?(bugmail)
Attachment #240856 -
Flags: superreview?(bugmail)
Attachment #240856 -
Flags: review?(bugmail)
Assignee | ||
Comment 5•18 years ago
|
||
This one compiles and works (tested using exslt.org testcases).
Attachment #246116 -
Attachment is obsolete: true
Attachment #246360 -
Flags: superreview?(bugmail)
Attachment #246360 -
Flags: review?(bugmail)
Attachment #246116 -
Flags: superreview?(bugmail)
Attachment #246116 -
Flags: review?(bugmail)
Is there a risk that anything can be put in the expression or flags to make it possible to break out of regexp and execute script? I can't see anything though.
Comment on attachment 246360 [details] [diff] [review] v2.1 >Index: content/xslt/src/xslt/txStylesheetCompiler.cpp >@@ -1062,7 +1078,49 @@ findFunction(nsIAtom* aName, PRInt32 aNa > } > } > >- return NS_ERROR_XPATH_UNKNOWN_FUNCTION; >+ if (!sXPCOMFunctionMappings) { >+ sXPCOMFunctionMappings = new nsTArray<txXPCOMFunctionMapping>; >+ } Check for OOM. >+ txXPCOMFunctionMapping *map; Please init this to nsnull. That way if we screw up somewhere it'll be a nullpointer deref rather than a security problem. with that, r/sr=sicking
Attachment #246360 -
Flags: superreview?(bugmail)
Attachment #246360 -
Flags: superreview+
Attachment #246360 -
Flags: review?(bugmail)
Attachment #246360 -
Flags: review+
Assignee | ||
Comment 8•18 years ago
|
||
Assignee | ||
Comment 9•18 years ago
|
||
(In reply to comment #6) > Is there a risk that anything can be put in the expression or flags to make it > possible to break out of regexp and execute script? I can't see anything > though. Me neither. Checked in with the additional patch to add the JS component to the package files.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Depends on: 363656
The regexp:match function is broken, see bug 363656
You need to log in
before you can comment on or make changes to this bug.
Description
•