Browse files

Update scripts/jquery.ajaxy.min.js

Added word bound to htmlCompat().  This is because the regex previously matched the html5 <header> tag and striped it out.  Now '<head ' and '<head>' will match and '<header ' and '<header>' will not match so <header> will not longer be stripped out.
  • Loading branch information...
1 parent 134713e commit d3a91304f7a0314a0ffead6ec40c13abfa517fa4 @exocom exocom committed Dec 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 scripts/jquery.ajaxy.min.js
View
2 scripts/jquery.ajaxy.min.js
@@ -117,5 +117,5 @@ c.fn.ajaxy=a.fn.ajaxify;c.each(a.fn,function(a,b){c.fn[a]=b});c(function(){a.onD
if(a.options.track_all_internal_links){var d=b.findAndSelf("a[href^=/],a[href^=./]");if(a.options.root_url){var e=c("a[href^="+a.options.root_url+"]"),d=d.add(e);delete e}d=d.filter(":not(.ajaxy,.no-ajaxy)").addClass("ajaxy");delete d}a.options.track_all_anchors&&b.findAndSelf("a[href^=#]:not(.ajaxy,.no-ajaxy)").addClass("ajaxy");b.addAjaxy();return b},addAjaxy:function(a){var b=c.Ajaxy,d=c(this);d.is("form,a")&&d.addClass("ajaxy");if(a){a=b.getController(a);a.classname&&d.addClass(a.classname)}d.findAndSelf("a.ajaxy:not(.ajaxy-has)").addClass("ajaxy-has").once("click",
b.ajaxifyHelpers.a);d.findAndSelf("form.ajaxy:not(.ajaxy-has)").addClass("ajaxy-has").once("submit",b.ajaxifyHelpers.form);return d},removeAjaxy:function(a){var b=c.Ajaxy,d=c(this),a=c.extend({permanently:true},a),e=d.findAndSelf("a.ajaxy").removeClass("ajaxy ajaxy-has").unbind("click",b.ajaxifyHelpers.a),b=d.findAndSelf("form.ajaxy").removeClass("ajaxy ajaxy-has").unbind("submit",b.ajaxifyHelpers.form);a.permanently&&e.add(b).addClass("no-ajaxy");return d}},ajaxifyHelpers:{a:function(a){var b=c.Ajaxy,
d=c(this),e=b.extractRelativeUrl(d.attr("href")).replace(/^\/?\.\//,"/"),f=b.extractState(e),e=b.extractAnchor(e);if("/"+e===f||e===f)e="";var g=!d.hasClass(b.options.no_log_class),d=d.data("ajaxy-controller")||null;b.go({state:f,controller:d,log:g,anchor:e,el:this});a.stopPropagation();a.preventDefault();return false},form:function(a){var b=c.Ajaxy,d=c(this),e=d.attr("disabled");if(e||e==="false")return false;if(d.attr("target"))return true;d=b.extractRelativeUrl(d.attr("action")).replace(/^\/?\.\//,
-"/");d=b.extractState(d);b.go({state:d,el:this});a.stopPropagation();a.preventDefault();return false}},htmlCompat:function(a){return(""+a).replace(/<\!DOCTYPE[^>]*>/i,"").replace(/<(html|head|body|title|meta)/gi,'<div id="ajaxy-$1"').replace(/<\/(html|head|body|title|meta)/gi,"</div")},stateChange:function(a){c.Ajaxy.request(a)},onConfigured:function(){return c.promise({object:this,handlers:"onConfiguredHandlers",flag:"isConfigured",arguments:arguments})},onDocumentReady:function(a){return c.promise({object:this,
+"/");d=b.extractState(d);b.go({state:d,el:this});a.stopPropagation();a.preventDefault();return false}},htmlCompat:function(a){return(""+a).replace(/<\!DOCTYPE[^>]*>/i,"").replace(/<(html|head|body|title|meta)\b/gi,'<div id="ajaxy-$1"').replace(/<\/(html|head|body|title|meta)\b/gi,"</div")},stateChange:function(a){c.Ajaxy.request(a)},onConfigured:function(){return c.promise({object:this,handlers:"onConfiguredHandlers",flag:"isConfigured",arguments:arguments})},onDocumentReady:function(a){return c.promise({object:this,
handlers:"onDocumentReadyHandlers",flag:"isDocumentReady",arguments:arguments})},onReady:function(a){return c.promise({object:this,handlers:"onReadyHandlers",flag:"isReady",arguments:arguments})}};c.Ajaxy.construct()}})(jQuery);

0 comments on commit d3a9130

Please sign in to comment.