Skip to content
Snippets Groups Projects
Commit 6b133e18 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Escape colon in `name` attribute.

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