Skip to content

Commit 4841fa8

Browse files
committed
use textContent instead of innerHTML to prevent html entities from being created
closes #10
1 parent 5b35004 commit 4841fa8

File tree

1 file changed

+1
-1
lines changed
  • src/main/resources/io/jenkins/plugins/json_editor_parameter/JsonEditorParameterDefinition

1 file changed

+1
-1
lines changed

src/main/resources/io/jenkins/plugins/json_editor_parameter/JsonEditorParameterDefinition/index.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
const holderElement = document.getElementById('editor:${it.name}:holder')
1515
const valueElement = document.getElementById('editor:${it.name}:value')
1616

17-
const options = JSON.parse(document.getElementById('editor:${it.name}:options').innerHTML)
17+
const options = JSON.parse(document.getElementById('editor:${it.name}:options').textContent)
1818
valueElement.value = JSON.stringify(options.startval)
1919

2020
const editor = new JSONEditor(holderElement, options)

0 commit comments

Comments
 (0)