Skip to content

Commit 7fac153

Browse files
authored
Applying escaping of theme contents (#40597)
Closes #40596 Signed-off-by: Alexander Schwartz <[email protected]>
1 parent 1350da4 commit 7fac153

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/guides/ui-customization/themes.adoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ Or to use directly in HTML templates add the following to a custom HTML template
252252
In order to use a custom footer, create a `footer.ftl` file in your custom login theme with the desired content.
253253

254254
An example for a custom `footer.ftl` may look like this:
255-
```
255+
256+
[source]
257+
----
258+
<#noparse>
256259
<#macro content>
257260
<#-- footer at the end of the login box -->
258261
<div>
@@ -263,7 +266,8 @@ An example for a custom `footer.ftl` may look like this:
263266
</ul>
264267
</div>
265268
</#macro>
266-
```
269+
</#noparse>
270+
----
267271

268272
=== Adding an image to an email theme
269273

@@ -322,13 +326,15 @@ For a list of templates in other theme types look at the `theme/base/<THEME_TYPE
322326
+
323327
For example, to create a custom login form for the `mytheme` theme, copy `themes/base/login/login.ftl` to `themes/mytheme/login` and open it in an editor.
324328
+
325-
${r"After the first line (<#import ...>), add `<h1>HELLO WORLD!</h1>` as shown here:"}
329+
After the first line (`+<#noparse><#import ...></#noparse>+`), add `<h1>HELLO WORLD!</h1>` as shown here:
326330
+
327331
[source,html]
328332
----
329-
${r"<#import"} "template.ftl" as layout>
333+
<#noparse>
334+
<#import "template.ftl" as layout>
330335
<h1>HELLO WORLD!</h1>
331336
...
337+
</#noparse>
332338
----
333339

334340
. Back up the modified template. When upgrading to a new version of {project_name} you may need to update your custom templates to apply changes to the original template if applicable.
@@ -408,4 +414,4 @@ If enabled, the dark variant of the theme will be applied based on user preferen
408414
== Additional resources for Themes
409415
* For more inspiration, see <<_default-themes,Default Themes>> bundled inside {project_name}.
410416
* {quickstartRepo_link}[{quickstartRepo_name}] - Directory `extension` of the quickstarts repository contains some theme examples, which can be also used as an inspiration.
411-
</@tmpl.guide>
417+
</@tmpl.guide>

0 commit comments

Comments
 (0)