[TYPO3-english] TEXT / HTML object changes single quotes into double ones

Urs Bräm info at ursbraem.ch
Wed Aug 17 13:01:04 CEST 2011


Hi all

Short version:

The TEXT and HTML object messes with single quotes in a snippet I'm 
trying to insert into the page object. It changes the single quotes into 
double ones. Is there a way to keep the quotes just as they are?

Thanks
Urs

Long version:

I am trying to insert the following snippet (from http://html5reset.org) 
into my page:

<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script 
src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script 
src="fileadmin/templates/main/js/jquery-1.5.1.min.js'>\x3C/script>")</script> 


I do it like this:

page.900 = HTML
# ... or TEXT, same effect
page.900.value (
# ... left out some stuff
<script>window.jQuery || document.write("<script 
src='fileadmin/templates/main/js/jquery-1.5.1.min.js'>\x3C/script>")</script> 

)

But stdWrap messes with the quotes!
That's what it inserts:

<script type="text/javascript">window.jQuery || document.write("<script 
src="fileadmin/templates/main/js/jquery-1.5.1.min.js" 
type="text/javascript">\x3C/script>")</script>

So it converted the inner single quotes into double quotes. Whitch 
results in a JS Error.

Is there a way to get the code completely untouched into the page object?

-- 
Urs Bräm
macht Websites
---
Certified Typo3 Integrator
CH-3011 Bern
www.ursbraem.ch


More information about the TYPO3-english mailing list