Re: Posgres Adding braces at beginning and end of text (html) content - Mailing list pgsql-general

From Leif B. Kristensen
Subject Re: Posgres Adding braces at beginning and end of text (html) content
Date
Msg-id 200904021545.28507.leif@solumslekt.org
Whole thread Raw
In response to Posgres Adding braces at beginning and end of text (html) content  (linnewbie <linnewbie@gmail.com>)
List pgsql-general
(CC'ed to the list)

On Thursday 2. April 2009, linnewbie wrote:
> I am using tcl ( ncgi and tclobdc ) so it is more like the excerpts
> below:
>
>ie I input:
>
><h1>Hello World </h1>
>
><p>xyz <p/>
>
>into the text area field, save:
>
>set page_content  [ ncgi::value  textarea_field_name]
>
>database connect dbh $datasource $dbuser $dbpassword
>
>set sql "INSERT INTO profile (page_content) \
>        VALUES('$page_content') "
>
>dbh $sql
>
>view:
>
>set sql "SELECT page_content FROM profile \
>        WHERE page_id = $page"
>
>set page_content [lindex [ dbh $sql ] 0]
>
>::ncgi::header "text/html
>
>puts "<textarea id='page_content' name='page_content'> $page_content
> </ textarea>"
>
> in browser I see:
>
>{<h1>Hello World </h1>
>
><p>xyz <p/>
>.........
>}
>
>On a subsequent update I see
>
>{{
>
><h1>Hello World </h1>
>
><p>xyz <p/>
>.........
>}}
>
>On another I see
>
>{{{
>
><h1>Hello World </h1>
>
><p>xyz <p/>
>.........
>}}}
>

This is definitely not a postgresql problem. I'm storing tons of HTML
code, mostly via PHP scripts, and have had only minor issues with it,
eg. HTML entities like & being rendered as naked ampersands on
retrieval. That's a nuisance when you try to keep the W3C validator
happy, but there are ways around it.

You should probably present your problem to the Tcl community, and see
if they can come up with a reason for this oddity.
--
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: %r in restore_command?
Next
From: John Cheng
Date:
Subject: Re: Posgres Adding braces at beginning and end of text (html) content