vendor/assets/javascripts/webshims/shims/combos/3.js in webshims-rails-1.15.6.4 vs vendor/assets/javascripts/webshims/shims/combos/3.js in webshims-rails-1.15.8
- old
+ new
@@ -1232,11 +1232,11 @@
}
});
})();
});
-;webshims.register('form-core', function($, webshims, window, document, undefined, options){
+webshims.register('form-core', function ($, webshims, window, document, undefined, options) {
"use strict";
webshims.capturingEventPrevented = function(e){
if(!e._isPolyfilled){
var isDefaultPrevented = e.isDefaultPrevented;
@@ -1371,10 +1371,12 @@
});
};
var transClass = ('transitionDelay' in document.documentElement.style) ? '' : ' no-transition';
var poCFG = webshims.cfg.wspopover;
+ var lReg = /</g;
+ var gReg = />/g;
addModule('form-validation', $.extend({d: ['form-message']}, formExtras));
addModule('form-validators', $.extend({}, formExtras));
@@ -1497,11 +1499,11 @@
$.fn.getErrorMessage = function(key){
var message = '';
var elem = this[0];
if(elem){
- message = webshims.getContentValidationMessage(elem, false, key) || $.prop(elem, 'customValidationMessage') || $.prop(elem, 'validationMessage');
+ message = webshims.getContentValidationMessage(elem, false, key) || $.prop(elem, 'customValidationMessage') || ($.prop(elem, 'validationMessage') || '').replace(lReg, '<').replace(gReg, '>');
}
return message;
};
$.event.special.valuevalidation = {
@@ -1545,11 +1547,11 @@
if(document.readyState == 'complete'){
webshims.isReady('WINDOWLOAD', true);
}
});
-;webshims.register('form-message', function($, webshims, window, document, undefined, options){
+webshims.register('form-message', function ($, webshims, window, document, undefined, options) {
"use strict";
if(options.lazyCustomMessages){
options.customMessages = true;
}
var validityMessages = webshims.validityMessages;
@@ -1789,10 +1791,10 @@
}
if(!message && name == 'typeMismatch'){
message = getMessageFromObj(currentValidationMessage.badInput, elem);
}
if(!message){
- message = getMessageFromObj(validityMessages[''][name], elem) || $.prop(elem, 'validationMessage');
+ message = getMessageFromObj(validityMessages[''][name], elem) || ($.prop(elem, 'validationMessage') || '').replace(lReg, '<').replace(gReg, '>');
if(name != 'customError'){
webshims.info('could not find errormessage for: '+ name +' / '+ $.prop(elem, 'type') +'. in language: '+webshims.activeLang());
}
}
message = webshims.replaceValidationplaceholder(elem, message, name);