Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make some regexps easier to read + information about required module used by test server #76

Closed
wants to merge 1 commit into from

2 participants

@mlowicki

No description provided.

@rrjamie

Ack! This should be now against the branch 1.1... probably should've merged this ages ago.

@rrjamie rrjamie closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 6, 2012
  1. @mlowicki
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 3 deletions.
  1. +3 −3 api/externals.js
  2. +4 −0 tests/index.html
View
6 api/externals.js
@@ -16,7 +16,7 @@ var $ = Mobify.$
})
}
- , openingScriptRe = new RegExp('(<script[\\s\\S]*?>)', 'gi')
+ , openingScriptRe = /(<script[\s\S]*?>)/gi
// Inline styles are scripts are disabled using a unkonwn type.
, tagDisablers = {
@@ -52,7 +52,7 @@ $.each(disablingMap, function(tagName, targetAttributes) {
attributeDisablingRes[tagName] = new RegExp(
'\\s+((?:'
+ targetAttributes.join('|')
- + ")\\s*=\\s*(?:'([\\s\\S])+?'|\"([\\s\\S])+?\"))", 'gi');
+ + ")\\s*=\\s*('|\")[\\s\\S]+?\\2)", 'gi');
})
attributeEnablingRe = new RegExp('\\sx-(' + keys(attributesToEnable).join('|') + ')', 'gi');
@@ -99,4 +99,4 @@ $.extend(HTML, {
}
});
-})(Mobify);
+})(Mobify);
View
4 tests/index.html
@@ -8,6 +8,10 @@
<body>
<!--
+ Prerequisites:
+
+ npm install connect
+
Usage:
$ node tests/server.js
Something went wrong with that request. Please try again.