Skip to content

Instantly share code, notes, and snippets.

@markhowellsmead
Created April 11, 2014 13:12
Show Gist options
  • Save markhowellsmead/10467669 to your computer and use it in GitHub Desktop.
Save markhowellsmead/10467669 to your computer and use it in GitHub Desktop.
TypoScript: Escape backslashes in inline Powermail translation strings
# Powermail includes required translations for Javascript inline (in the page footer HTML)
# Some translations e.g. French include single quotes, which break the format of the Javascript string.
# m@mhm.li - 04/2014 - Free use, no credit required
# Via http://forge.typo3.org/issues/54183
# Add the following to TS Setup:
page.1000 {
10 {
stdWrap.replacement {
10 {
search = '
replace = \'
}
}
}
20.stdWrap.replacement < .10.stdWrap.replacement
30.stdWrap.replacement < .10.stdWrap.replacement
40.stdWrap.replacement < .10.stdWrap.replacement
50.stdWrap.replacement < .10.stdWrap.replacement
60.stdWrap.replacement < .10.stdWrap.replacement
70.stdWrap.replacement < .10.stdWrap.replacement
80.stdWrap.replacement < .10.stdWrap.replacement
90.stdWrap.replacement < .10.stdWrap.replacement
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment