You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ For advice on how to use these release notes, see [our guidance on staying up to
4
4
5
5
## Unreleased
6
6
7
+
### Fixes
8
+
9
+
We've made fixes to GOV.UK Frontend in the following pull requests:
10
+
11
+
- [#6351: Preserve already escaped `attributes` values to prevent double escaping](https://github.com/alphagov/govuk-frontend/pull/6351) thanks to @colinrotherham for fixing this issue
12
+
7
13
## v6.0.0-beta.1 (Beta breaking release)
8
14
9
15
### Breaking changes
@@ -272,7 +278,6 @@ We've made fixes to GOV.UK Frontend in the following pull requests:
272
278
273
279
- [#5311: Remove non-operational value parameter from file upload component](https://github.com/alphagov/govuk-frontend/pull/5311)
274
280
- [#6434: Fix rebranded header background being visible when printed](https://github.com/alphagov/govuk-frontend/pull/6434) - thanks to @lewis-softwire for reporting this issue
275
-
- [#6447: Fix pagination outputting empty links when provided a null or empty value](https://github.com/alphagov/govuk-frontend/pull/6447) – thanks to @NikhilNanjappa for reporting this issue
'data-double-escaped-text': 'Testing & more' | escape
290
+
}) -}}
291
+
`)
292
+
293
+
expect(attributes).toBe(
294
+
' data-text="Testing" data-unsafe-text="Testing & more" data-safe-text="Testing & more" data-escaped-text="Testing & more" data-double-escaped-text="Testing & more"'
280
295
)
296
+
})
297
+
298
+
it('outputs values from mappings that are passed from the `safe` filter',()=>{
299
+
// Render directly otherwise nunjucks `renderMacro()` will stringify
300
+
// safe `is escaped` instances into plain `is mapping` objects
301
+
constattributes=renderString(outdent`
302
+
{%- from "govuk/macros/attributes.njk" import govukAttributes -%}
' data-text="Testing" data-unsafe-text="Testing & more" data-safe-text="Testing & more" data-escaped-text="Testing & more" data-double-escaped-text="Testing & more"'
0 commit comments