[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

HTML tags in database

Amos King

9/29/2006 1:34:00 PM

I put html tags in a longtext field in my database, but when I grab it
for the page it uses it as regualr text. How can I get the html tags
to be recognized?

--
Amos King
USPS
Programmer/Analyst
St. Louis, MO

6 Answers

Gregory Brown

9/29/2006 3:10:00 PM

0

On 9/29/06, Amos King <amos.l.king@gmail.com> wrote:
> I put html tags in a longtext field in my database, but when I grab it
> for the page it uses it as regualr text. How can I get the html tags
> to be recognized?

Can you show some specifc code please? There isn't enough context
here for us to help you.

Carlos

9/29/2006 3:13:00 PM

0

Amos King wrote:

> I put html tags in a longtext field in my database, but when I grab it
> for the page it uses it as regualr text. How can I get the html tags
> to be recognized?

You are probably escaping "<", ">" and "&". Just don't do that.
--



Amos King

9/29/2006 3:17:00 PM

0

On 9/29/06, Gregory Brown <gregory.t.brown@gmail.com> wrote:
> On 9/29/06, Amos King <amos.l.king@gmail.com> wrote:
> > I put html tags in a longtext field in my database, but when I grab it
> > for the page it uses it as regualr text. How can I get the html tags
> > to be recognized?
>
> Can you show some specifc code please? There isn't enough context
> here for us to help you.
>
>

sure

<table>
<tr>
<td><%= post.body %></td>
</tr>
</table>

body may look like:

Hello, I'm a <a href="www.google.com">link</a>!

I want the html to be interpreted, but it is showing up as text in my
browser so link is not a link.

--
Amos King
USPS
Programmer/Analyst
St. Louis, MO

Amos King

9/29/2006 7:46:00 PM

0

I put html tags in a longtext field in my database, but when I grab it
for the page it uses it as regualr text. How can I get the html tags
to be recognized?

rhtml looks like:

<table>
<tr>
<td><%= post.body %></td>
</tr>
</table>

body may look like:

Hello, I'm a <a href="www.google.com">link</a>!

output:

Hello, I'm a <a href="www.google.com">link</a>!

I want the html to be interpreted, but it is showing up as text in my
browser so link is not a link.

Does anyone know of a way to accomplish this.

Thanks
Amos

Gregory Brown

9/29/2006 8:09:00 PM

0

On 9/29/06, Amos King <amos.l.king@gmail.com> wrote:

> Hello, I'm a <a href="www.google.com">link</a>!

Look at the source code.

You might be actually getting &lt;

Rugby

8/20/2011 3:04:00 AM

0

On Aug 19, 9:41 pm, "Peter T. Daniels" <gramma...@verizon.net> wrote:
> To come back, sort of, to the topic, I don't think anyone ever
> considered Alicia de Larrocha [gack! I don't know how to spell her,
> and I was at her very first Mostly Mozart concert like 40 years ago]
> beautiful...


Not to mention Clara Haskill or Myra Hess !

Dufus