Re: Posgres Adding braces at beginning and end of text (html) content

Поиск
Список
Период
Сортировка
От Leif B. Kristensen
Тема Re: Posgres Adding braces at beginning and end of text (html) content
Дата
Msg-id 200904021545.28507.leif@solumslekt.org
обсуждение исходный текст
Ответ на Posgres Adding braces at beginning and end of text (html) content  (linnewbie <linnewbie@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: %r in restore_command?
Следующее
От: John Cheng
Дата:
Сообщение: Re: Posgres Adding braces at beginning and end of text (html) content