Single Quotes Doubling

Author Message

Deane Barker

Thursday 05 February 2004 12:07:21 pm

I'm having problems with single quotes (apostrophes) doubling up. If I have text like this:

"This is Deane's car."

It becomes this after I save.

"This is Deane''s car."

I tried fiddling with magic_quotes, but it's already off. If I turn it on, I get about EIGHT single quotes after saving for each one I had before saving.

I searched these forums, but all I found was references to slashes, which magic_quotes is supposed to fix. I couldn't find anything about single quotes.

Any througts on this?

Deane

Balazs Halasy

Friday 06 February 2004 1:14:26 am

Hi,

I'm not sure in which context this problem of yours relates to, if it is related to template code then perhaps the following lines shed some light on the issue:

It is possible to use quotes inside strings. This can be done in two ways:

-by using a different kind of quote
-by using an escape character

In other words, if you need to use a quote inside a string, you can either switch to the other enclosing quote type, or escape the quote character with a backslash. The following examples demonstrate the use of quotes inside strings:

{'The following text is double quoted: "Rock and roll!"  '}
{"The following text is single quoted: 'Rock and roll!'  "}
{'Using both single and double quotes: "Rock\'n roll!"   '}
{'Using both single and double quotes: \'Rock\'n roll!\' '}
{"Using both single and double quotes: 'Rock'n roll!'    "}
{"Using both single and double quotes: \"Rock'n roll\"   "}

The output of the template code above will be:

The following text is double quoted: "Rock and roll!"
The following text is single quoted: 'Rock and roll!'
Using both single and double quotes: "Rock'n roll!"
Using both single and double quotes: 'Rock'n roll!'
Using both single and double quotes: 'Rock'n roll!'
Using both single and double quotes: "Rock'n roll!"

Because of the way template code is defined (template code is encapsulated in a matching pair of curly brackets), the right curly bracket, "}", must also be prepended by the backslash escape character. The following example demonstrates this:

{'{ This text is inside curly brackets.\}'}

The output of the template code above will be:

{This text is inside curly brackets.}

Balazs

Deane Barker

Friday 06 February 2004 4:40:56 am

I'm sorry, this isn't in template code. This is in object properties. When I create a new object and enter a value in a text field. When I save and go back to edit again, all the single quotes have been doubled.

I should have been more clear. Sorry.

Deane Barker

Wednesday 18 February 2004 10:43:34 am

Still looking for an answer here. Anyone?

Balazs Halasy

Thursday 19 February 2004 5:46:53 am

Hmm, I think you'll have to describe the problem in a bit more detail. Write down a step-by-step list that describes your actions. Where is it that you get the double quote phenomenon? Does this thing appear when you use the admin interface? Which version of eZ publish are you running? Please understand that if you want help then you need to provide as much information as possible (or else, other people in the forum will not be able to answer).

Balazs

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:16:12
Script start
Timing: Jan 18 2025 22:16:12
Module start 'layout'
Timing: Jan 18 2025 22:16:12
Module start 'content'
Timing: Jan 18 2025 22:16:13
Module end 'content'
Timing: Jan 18 2025 22:16:13
Script end

Main resources:

Total runtime0.6217 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.4219152.6094
Module start 'layout' 0.00640.0030 742.031339.4141
Module start 'content' 0.00940.6110 781.4453540.9609
Module end 'content' 0.62050.0012 1,322.406316.1875
Script end 0.6217  1,338.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5552160.0002
Check MTime0.00130.2124160.0001
Mysql Total
Database connection0.00090.139910.0009
Mysqli_queries0.552688.8782630.0088
Looping result0.00070.1059610.0000
Template Total0.590094.920.2950
Template load0.00210.332320.0010
Template processing0.587994.560020.2939
Template load and register function0.00010.020610.0001
states
state_id_array0.00090.138210.0009
state_identifier_array0.00190.311220.0010
Override
Cache load0.00180.2909440.0000
Sytem overhead
Fetch class attribute can translate value0.00090.140620.0004
Fetch class attribute name0.00190.301270.0003
XML
Image XML parsing0.00290.471120.0015
class_abstraction
Instantiating content class attribute0.00000.0044100.0000
General
dbfile0.00350.5656220.0002
String conversion0.00000.001640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs