Skip to content

Commit

Permalink
Fix(web-twig): Escape value attributtes in input components
Browse files Browse the repository at this point in the history
refs: #DS-645
  • Loading branch information
literat committed Mar 23, 2023
1 parent dbf1660 commit 12219cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{%- set _checkedAttr = _isChecked ? 'checked' : null -%}
{%- set _disabledAttr = _isDisabled ? 'disabled' : null -%}
{%- set _requiredAttr = _isRequired ? 'required' : null -%}
{%- set _valueAttr = _value ? 'value="' ~ _value ~'"' : null -%}
{%- set _valueAttr = _value ? 'value=' ~ _value : null -%}

{# Miscellaneous #}
{%- set _classNames = [ _rootClassName, _rootDisabledClassName, _rootItemClassName, _rootValidationStateClassName, _class ] -%}
Expand All @@ -53,7 +53,7 @@
{{ _checkedAttr | raw }}
{{ _disabledAttr | raw }}
{{ _requiredAttr | raw }}
{{ _valueAttr | raw }}
{{ _valueAttr }}
/>
<span class="{{ _textClassName }}">
<span {{ classProp(_labelClassName) }}>{{ _label | raw }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{# Attributes #}
{%- set _checkedAttr = _isChecked ? 'checked' : null -%}
{%- set _disabledAttr = _isDisabled ? 'disabled' : null -%}
{%- set _valueAttr = _value ? 'value="' ~ _value ~'"' : null -%}
{%- set _valueAttr = _value ? 'value=' ~ _value : null -%}
{%- set _idAttr = _id ? 'id="' ~ _id ~'"' : null -%}
{%- set _labelForAttr = _id ? 'for="' ~ _id ~'"' : null -%}

Expand All @@ -43,7 +43,7 @@
{{ _idAttr | raw }}
{{ _checkedAttr | raw }}
{{ _disabledAttr | raw }}
{{ _valueAttr | raw }}
{{ _valueAttr }}
/>
<span class="{{ _textClassName }}">
<span {{ classProp(_labelClassName) }}>{{ _label | raw }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{%- set _disabledAttr = _isDisabled ? 'disabled' : null -%}
{%- set _placeholderAttr = _placeholder ? 'placeholder="' ~ _placeholder ~'"' : null -%}
{%- set _requiredAttr = _isRequired ? 'required' : null -%}
{%- set _valueAttr = _value ? 'value="' ~ _value ~'"' : null -%}
{%- set _valueAttr = _value ? 'value=' ~ _value : null -%}

{# Extended Attributes for TextArea #}
{%- set _rowsAttr = _rows ? 'rows="' ~ _rows ~ '"' : null -%}
Expand Down Expand Up @@ -81,7 +81,7 @@
{{ _disabledAttr | raw }}
{{ _requiredAttr | raw }}
>
{{ _value | raw }}
{{ _value }}
</textarea>
{% else %}
{% if _hasPasswordToggle %}
Expand Down Expand Up @@ -125,7 +125,7 @@
{{ _inputWidthAttr | raw }}
{{ _placeholderAttr | raw }}
{{ _requiredAttr | raw }}
{{ _valueAttr | raw }}
{{ _valueAttr }}
/>
{% endif %}
{% endif %}
Expand Down

0 comments on commit 12219cf

Please sign in to comment.