Skip to content
This repository

Strip single quotes as well as double from `pie-load-path` #202

Merged
merged 1 commit into from about 2 years ago

2 participants

Виталий Jason Johnston
Виталий

pie-load-path can contain url in single quotes. IE8 translates them to double, but IE7 preserves single

Jason Johnston lojjic merged commit 9697dfe into from February 27, 2012
Jason Johnston lojjic closed this February 27, 2012
Jason Johnston
Owner

If we wanted to be totally accurate we would verify that the beginning and ending quotes match each other -- but I don't think we have to worry about that in this case.

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 27, 2012
Виталий Strip single quotes as well as double from `pie-load-path` a1ac21f
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  sources/htc_script.js
2  sources/htc_script.js
@@ -32,7 +32,7 @@ if ( !window[ 'PIE' ] && docMode < 10 ) {
32 32
         // Look for a custom -pie-load-path, or fall back to the CDN url
33 33
         baseUrl = doc.documentElement.currentStyle.getAttribute( ( isIE6 ? '' : '-' ) + 'pie-load-path' );
34 34
         if( baseUrl ) {
35  
-            baseUrl = baseUrl.replace(/^"|"$/g, '');
  35
+            baseUrl = baseUrl.replace(/^("|')|("|')$/g, '');
36 36
             baseUrls = [ baseUrl ];
37 37
         }
38 38
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.