Skip to content

Commit

Permalink
Add |safe filter to error validation (#4169)
Browse files Browse the repository at this point in the history
Applying a filter to the phone number error element that prevents HTML encoding of ' symbol.
  • Loading branch information
rnovak338 authored Aug 12, 2024
1 parent 59c31a3 commit b6ba664
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ <h2 class="font-sans-xl">Auditee information</h2>
name="auditee_phone"
aria-required="false"
value="{{ auditee_phone | default_if_none:'' }}" />
<span class="usa-error-message" id="auditee-phone-error-message" role="alert">{{ errors.auditee_phone|space_before_striptags }}</span>
<span class="usa-error-message" id="auditee-phone-error-message" role="alert">{{ errors.auditee_phone|space_before_striptags|safe }}</span>
</div>
<div class="usa-form-group">
<label class="usa-label" for="auditee_email">Auditee email</label>
Expand Down Expand Up @@ -498,7 +498,7 @@ <h2 class="font-sans-xl">Primary auditor information</h2>
name="auditor_phone"
aria-required="false"
value="{{ auditor_phone | default_if_none:'' }}" />
<span class="usa-error-message" id="auditor-phone-error-message" role="alert">{{ errors.auditor_phone|space_before_striptags }}</span>
<span class="usa-error-message" id="auditor-phone-error-message" role="alert">{{ errors.auditor_phone|space_before_striptags|safe }}</span>
</div>
<div class="usa-form-group">
<label class="usa-label" for="auditor_email">Auditor email</label>
Expand Down

0 comments on commit b6ba664

Please sign in to comment.