Quantcast
Channel: bundletransformer Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 698

Edited Issue: CssRelativePathResolver appends relative path to data uri's [23]

$
0
0
BundleTransformer.Core.FileSystem.CssRelativePathResolver resolves data uri's such as url('data:...') to a relative path such as url('/some/path/data:'). Data uri's should be ignored for this processing task.

I'm not sure if it would be possible to modify the following in order to ignore data uri's:

/// <summary>
/// Regular expression for working with paths of components in CSS-code
/// </summary>
private static readonly Regex _urlStylesheetRuleRegex = new Regex(@"url\(((?<quote>'|"")(?<url>[\w \-+.:,;/?&=%~#$@()\[\]{}]+)(\k<quote>)" + @"|(?<url>[\w\-+.:,;/?&=%~#$@\[\]{}]+))\)", RegexOptions.IgnoreCase | RegexOptions.Compiled);

Otherwise it would be possible to just do an index check and ignore urls containg 'data:' at:
public string ResolveComponentsRelativePaths(string content, string path)

Thanks and great job!

Viewing all articles
Browse latest Browse all 698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>