Skip to content

Instantly share code, notes, and snippets.

@Megafry
Last active November 17, 2021 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Megafry/75f9fa72ae1e673941befa942f0ff6d9 to your computer and use it in GitHub Desktop.
Save Megafry/75f9fa72ae1e673941befa942f0ff6d9 to your computer and use it in GitHub Desktop.
TYPO3: add warning text to all external links with regex
page.10.stdWrap.replacement {
10 {
search = #(<a.*?target="_blank".*?>)(.*?)(</a>)#i
replace {
wrap2 = ${1}${2} |${3}
noTrimWrap = |<span class="show-for-sr"> |</span>|
data = LLL:EXT:...locallang.xlf:link_open_in_new_windows
}
useRegExp = 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment