[TYPO3-english] Question typoscript security

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Dec 24 22:06:07 CET 2015


Hi,

On 24/12/2015 15:06, Christoph Werner wrote:
> 1.) Do I need the htmlSpecialChars in both examples?

Both examples put something inside a href attribute, whatever is inside 
a href attribute should be htmlSpecialChar'ed for HTML4/XHTML and in 
some cases for HTML5.

> 2.) Would that be right:
>
> lib.canonical = TEXT
> lib.canonical {
>     typolink {
>         parameter = {page:uid}
>         parameter.insertData = 1
>         useCacheHash = 1
>         addQueryString = 1
>         addQueryString.method = GET
>         addQueryString.exclude = id
>         returnLast = url
>     }
>     htmlSpecialChars = 1
>     wrap = <link rel="canonical" href="http://www.mydomain.com/|" />
> }
>
> 3.) How can I use a typolink to create the absolute URL?

https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Typolink/Index.html 
look for the forceAbsoluteUrl property.

Then you can leave out the http://.... part. It will also work with for 
example RealURL and different domains for various languages.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list