File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ module HTML {
214214 result = path .regexpCapture ( "file://(/.*)" , 1 )
215215 or
216216 not path .regexpMatch ( "(\\w+:)?//.*" ) and
217- result = this .getSourcePath ( ) . ( ScriptSrcPath ) . resolve ( this .getSearchRoot ( ) ) .toString ( )
217+ result = ResolveScriptSrc :: resolve ( this .getSearchRoot ( ) , this .getSourcePath ( ) ) .toString ( )
218218 )
219219 }
220220
@@ -274,10 +274,16 @@ module HTML {
274274 )
275275 }
276276
277+ private module ResolverConfig implements Folder:: ResolveSig {
278+ predicate shouldResolve ( Container base , string path ) { scriptSrc ( path , base ) }
279+ }
280+
281+ private module ResolveScriptSrc = Folder:: Resolve< ResolverConfig > ;
282+
277283 /**
278284 * A path string arising from the `src` attribute of a `script` tag.
279285 */
280- private class ScriptSrcPath extends PathString {
286+ deprecated private class ScriptSrcPath extends PathString {
281287 ScriptSrcPath ( ) { scriptSrc ( this , _) }
282288
283289 override Folder getARootFolder ( ) { scriptSrc ( this , result ) }
You can’t perform that action at this time.
0 commit comments