Forums / General / Escaping SQL examples in an article

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Escaping SQL examples in an article

Author Message

Christopher von Nagy

Friday 14 November 2003 8:37:45 am

I have run into a problem trying to include example sql code in an article. If I include an example of the sql case function used to group a time field in postgresql into quarter hour segments in conjunction with the date_part function, the article text following the case function is duplicated and included HTML tags are dropped or split. We are using postgresql as a backend for the cms. I would include an example of the code, but I'm afraid the same problem would occur with forum text.

Any help or suggestions would be appreciated. Perhaps it is possible to escape sql examples in the text?

Thanks

Update, the problem occurs with the following code snippet:

WHEN date_part('minute', datetime) less than character 15 THEN '1'.

The code following the less than character is eaten by Exponential and the mess starts, so I guess I need to know how to escape a less than or greater than character so they are not mistaken for HTML snippets by Exponential.

Paul Forsyth

Friday 14 November 2003 9:51:40 am

Have you tried using the {literal} tag? Ez should ignore anything between {literal} {/literal}

Christopher von Nagy

Saturday 15 November 2003 4:31:18 pm

Using the {literal}{/literal} tag set worked well. Thank you.