Skip to content

Commit

Permalink
allow "-" in protocol names in $.injectBaseHrefToHtml()
Browse files Browse the repository at this point in the history
  • Loading branch information
maranomynet committed Nov 4, 2013
1 parent b70e63d commit 4ab21b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 1.1/jquery.virtualbrowser-1.1-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 1.1/jquery.virtualbrowser-1.1.js
Expand Up @@ -170,7 +170,7 @@
html = html
[_replace](/(<[^>]+ (href|src|action)=["'])(["'#])/gi, '$1'+filePart+'$3') // prepend all empty/withinpage urls with filePart
[_replace](/(<[^>]+ (href|src|action)=["'])\?/gi, '$1'+filePart.split('?')[0]+'?') // prepend all samepage querystring URLs ("?baz=1") with just the filename
[_replace](/(["'])([a-z]{3,12}:)/gi, '$1`<<`>>$2') // Escape all protocol names (potential URLs) for easy, cross-browser RegExp detection
[_replace](/(["'])([a-z-]{3,12}:)/gi, '$1`<<`>>$2') // Escape all protocol names (potential URLs) for easy, cross-browser RegExp detection
[_replace](/(<[^>]+ (href|src|action)=["'])([^\/`])/gi, '$1'+pathPrefix+'$3') // prepend pathPrefix to all relative URLs (not starting with `/`, `//`, ` ({protocol}:)
[_replace](/\`<<`>>/g, ''); // Unescape "protocol" back to normal
return html;
Expand Down

0 comments on commit 4ab21b0

Please sign in to comment.