Lucene search

K
atlassian2f0471d2a1a4CONFSERVER-82543
HistoryMar 15, 2023 - 2:40 p.m.

JavaScript Code with variable containing underscore does not work

2023-03-1514:40:17
2f0471d2a1a4
jira.atlassian.com
18
javascript
variable
underscore
page template
html macro
3rd party plugin
functioning
input
rendering
workaround

h3. Issue Summary

JavaScript Code with a variable containing an underscore does not work in

  • Page Template
  • HTML macro
  • 3rd Party Plugin (Script Runner)

h3. Steps to Reproduce

Sample code block:Β 
{code:java}
$test
$test_1

<script type=β€œtext/javascript”>
$(β€œinput[name=β€˜variableValues.test’]”).change(function (){
console.log($(this).val());
$(β€œform[name=β€˜templateForm’]”).find(β€œinput[name=β€˜title’]”).val($(this).val())})
</script>{code}
h3. Expected Results

test_1 variable should receive an input
h3. Actual Results

test_1 variable is not rendered correctly
h3. Workaround

Currently there is no known workaround for this behavior. A workaround will be added here when available

Affected configurations

Vulners
Node
atlassianconfluence_data_centerRange≀7.19.5
OR
atlassianconfluence_data_centerRange≀8.1.0
OR
atlassianconfluence_data_centerRange≀8.0.2
OR
atlassianconfluence_data_centerRange≀8.1.1
OR
atlassianconfluence_data_centerRange<8.3.0