Commit 6b133e18 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Escape colon in `name` attribute.

parent 60406bfa
......@@ -27,7 +27,7 @@ QfqNS.Element = QfqNS.Element || {};
* @function QfqNS.Element.getElement
*/
n.getElement = function (name) {
var $element = $('[name="' + name + '"]:not([type="hidden"])');
var $element = $('[name="' + QfqNS.escapeJqueryIdSelector(name) + '"]:not([type="hidden"])');
if ($element.length === 0) {
throw Error('No element with name "' + name + '" found.');
}
......
......@@ -74,7 +74,7 @@ QfqNS.Validation = QfqNS.Validation || {};
return null;
}
$slave = this.findOnForm('[name=' + slaveName + ']');
$slave = this.findOnForm('[name=' + QfqNS.escapeJqueryIdSelector(slaveName) + ']');
if ($slave.length === 0) {
return null;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment