1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Merge pull request #3229 from mabashian/popover-quote-entity

Replace single quote with appropriate entity when generating new attribute

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-02-14 16:32:57 +00:00 committed by GitHub
commit 456ef49ee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ angular.module('GeneratorHelpers', [systemStatus.name])
.factory('Attr', function () { .factory('Attr', function () {
return function (obj, key, fld) { return function (obj, key, fld) {
var i, s, result, 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)) { if (/^ng/.test(key)) {
result = 'ng-' + key.replace(/^ng/, '').toLowerCase() + "=\"" + value + "\" "; result = 'ng-' + key.replace(/^ng/, '').toLowerCase() + "=\"" + value + "\" ";