[TYPO3] Include reference to external javascript file
Peter Gallagher
pgallagher at electricretina.com
Thu Oct 19 16:26:20 CEST 2006
Dmitry Dulepov wrote:
> Hi!
>
> Peter Gallagher wrote:
>> It turns out that my hosting provider has implemented an intrusion
>> detection system in there shared hosting environment that is filtering
>> out anything that looks like a cross-site scripting attack. This has
>> been messing with my head for about two days now. So basically I
>> cannot add any files or make any template changes that have javascript.
>>
>> Totally sucks!
>>
>> I guess I am going to have to make those changes locally and then
>> update the server via a t3d file - bites my butt.
>
> Try something like this:
>
> page.headerData.100 = TEXT
> page.headerData.100.value = script type="text/javascript
> src="fileadmin/templates/scripts/menu.js"></script
> page.headerData.100.wrap = <|>
>
Thanks Dmitry, and what you suggested will work in most cases, but because my hosting
provider runs intrusion detection software that scans POST data for anything that looks
like a cross-site-scripting attack (eg. <script> tags), the change to the template setup
gets stripped out and so no change is made to the template file.
My solution was to put the reference back into the HTML template file and include them
using TV then upload to the server using my FTP software instead of the typo3
file-browser. I was worried that if I deleted the files first (because they were created
by importing a t3d file) that when I uploaded the new files the internal references would
be lost. It turned out that this was not the case and everything was fine.
Thanks for taking the time to reply,
Peter Gallagher
::share::
More information about the TYPO3-english
mailing list