[TYPO3-english] Question typoscript security

Christoph Werner info at wortvampir.de
Thu Dec 24 11:46:24 CET 2015


Hi all!

I found two typoscript solutions for building canonical-Tags (seo stuff). Solution 1 can be used when having records (news, blogposts...) in action. When testing, both working like expected.

My question: did I need some kind of escaping?! Expecially solution 1? How could escaping look like?

Thx a lot!
Chris

## canonical solution 1
lib.canonical = TEXT
lib.canonical {
    typolink {
        parameter = {page:uid}
        parameter.insertData = 1
        useCacheHash = 1
        addQueryString = 1
        addQueryString.method = GET
        addQueryString.exclude = id
        returnLast = url
    }
    wrap = <link rel="canonical" href="http://www.mydomain.com/|" />
}


## canonical solution 2
lib.canonical = TEXT
lib.canonical {
  typolink.parameter.data = TSFE:id
  typolink.returnLast = url
  wrap = <link rel="canonical" href="http://www.mydomain.com/|"/>
}

..

page.headerData.20 < lib.canonical


More information about the TYPO3-english mailing list