Skip to content

Commit

Permalink
Merge pull request #52 from ByteParty/xss-metatag-fix
Browse files Browse the repository at this point in the history
[Task] convert special characters to HTML entities
  • Loading branch information
MarcMoschSLUB authored Apr 17, 2023
2 parents b50039f + 1a48581 commit 049e1a7
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions Configuration/TypoScript/Plugin/Kitodo/common.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,8 @@ page {
page.headerData.300 {
10 = TEXT
10.value (
<link rel="canonical" href="{register:pageUrlDigital}" />
<meta property="og:title" content="{register:postTitle}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{register:pageUrlDigital}" />
<meta property="og:type" content="website" />
)
10.insertData = 1

11 = TEXT
11 {
Expand All @@ -256,6 +252,36 @@ page {
htmlSpecialChars.preserveEntities = 1
}

12 = TEXT
12 {
data = register:postTitle
wrap = <meta property="og:title" content="|" />
required = {register:postTitle}
trim = 1
htmlSpecialChars = 1
htmlSpecialChars.preserveEntities = 1
}

13 = TEXT
13 {
data = register:pageUrlDigital
wrap = <link rel="canonical" href="|" />
required = {register:pageUrlDigital}
trim = 1
htmlSpecialChars = 1
htmlSpecialChars.preserveEntities = 1
}

14 = TEXT
14 {
data = register:pageUrlDigital
wrap = <meta property="og:url" content="|" />
required = {register:pageUrlDigital}
trim = 1
htmlSpecialChars = 1
htmlSpecialChars.preserveEntities = 1
}

}

[END]

0 comments on commit 049e1a7

Please sign in to comment.