Permalink
Browse files

Fix rurl and rLocalProtocol in ajax.js to recognize 'local:/file.html…

…' - style URIs; Such URIs are returned in a Blackberry Playbook bbwp - compiled application.

See http://us.blackberry.com/developers/browserdev/widgetsdk.jsp
  • Loading branch information...
1 parent 2d0bc7c commit 920be8aeed9c515db1a5f856ef50c7e61fa0ba23 @bendlas committed Mar 6, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/ajax.js
View
@@ -7,7 +7,7 @@ var r20 = /%20/g,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /(?:^file|^widget|\-extension):$/,
+ rlocalProtocol = /(?:^local|^file|^widget|\-extension):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rquery = /\?/,
@@ -19,7 +19,7 @@ var r20 = /%20/g,
rucHeadersFunc = function( _, $1, $2 ) {
return $1 + $2.toUpperCase();
},
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?|\/[^\/])/,
+ rurl = /^([\w\+\.\-]+:)(?:(?:\/\/)?([^\/?#:]*)(?::(\d+))?|\/[^\/])/,
// Keep a copy of the old load method
_load = jQuery.fn.load,

0 comments on commit 920be8a

Please sign in to comment.