Skip to content

Commit 54d7ae5

Browse files
khangonnorbusan
authored andcommitted
fix-9154: [Badge Wizard] Showing <a> tag in custom field when organiz… (#9157)
* fix-9154: [Badge Wizard] Showing <a> tag in custom field when organizer tries to add custom question to badge * fix-9154: [Badge Wizard] Showing <a> tag in custom field when organizer tries to add custom question to badge
1 parent 2a8e221 commit 54d7ae5

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

app/helpers/value-field-link.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { helper } from '@ember/component/helper';
2+
import { htmlSafe } from '@ember/string';
3+
4+
export function valueFieldLink(data) {
5+
let field = '';
6+
if(data){
7+
field = data;
8+
}
9+
return htmlSafe(field);
10+
}
11+
12+
export default helper(valueFieldLink);

app/templates/components/forms/wizard/badge-field-form.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<i class="dropdown icon"></i>
4141
{{#if this.data.custom_field}}
4242
<div class="default">
43-
{{t-var this.data.custom_field}}
43+
{{value-field-link (t-var this.data.custom_field)}}
4444
</div>
4545
{{else}}
4646
<div class="default text">
@@ -55,8 +55,8 @@
5555
</div>
5656
{{else}}
5757
{{#if cfield.isComplex}}
58-
<div class=" item complex-item" data-value="{{cfield.isComplex}}">
59-
{{rich-text-link cfield.isComplex}}
58+
<div class=" item complex-item" data-value="{{value-field-link cfield.isComplex}}">
59+
{{value-field-link cfield.isComplex}}
6060
</div>
6161
{{/if}}
6262
{{/if}}
@@ -85,7 +85,7 @@
8585
{{#each this.getQrFields as |field|}}
8686
{{#if field}}
8787
<div data-value="{{map-value mapper field.fieldIdentifier}}" class="item">
88-
{{field.name}}
88+
{{value-field-link field.name}}
8989
</div>
9090
{{/if}}
9191
{{/each}}

0 commit comments

Comments
 (0)