mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 06:01:25 -03:30
Replace single quote with appropriate entity when generating new attribute
This commit is contained in:
parent
06ff26752a
commit
ef89195e6c
@ -22,7 +22,7 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
.factory('Attr', function () {
|
||||
return function (obj, key, fld) {
|
||||
var i, s, result,
|
||||
value = (typeof obj[key] === "string") ? obj[key].replace(/[\'\"]/g, '"') : obj[key];
|
||||
value = (typeof obj[key] === "string") ? obj[key].replace(/[\"]/g, '"').replace(/[\']/g, ''') : obj[key];
|
||||
|
||||
if (/^ng/.test(key)) {
|
||||
result = 'ng-' + key.replace(/^ng/, '').toLowerCase() + "=\"" + value + "\" ";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user