Affects Version/s: None
Fix Version/s: None
Separate the parsing behaviour so it is testable. Then, add failing tests first, then fix it.
Replace regex parsing with just NSURL, then parse the wildcard bits explicitly for items that cannot be parsed. This is more readable and maintanable. Doubt there are any significant speedups with regex here anyway since URL loading in Cordova through links are not time sensitive (since gap: urls are not put through the whitelist).
Only anchor tag links are put through the whitelist with the new re-factor (further processed whether they are <allow-intent> and <allow-navigation>, everything else is loaded by the webview.