Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Displaying HTML tags in a database
Old 08-20-2003, 12:26 PM Displaying HTML tags in a database
Devil's Angel's Avatar
Novice Talker

Posts: 8
Location: Nova Scotia, Canada
Trades: 0
Hi there!

Hopefully this is the right place to post this. If not I apologize.

Here's my problem:

I have an Access database and I would like to include html tags in the memo fields for bulleted lists...bold...italics...etc.

When this information is displayed in the browser all HTML tags embeded in the database memo field are displayed as plain text (e.g. <b>bolded</b>).

Is there any way I can make these tags display correctly in HTML? I'm using ASP to call on this database.

Thanks! Any help is greatly appreciated.
Devil's Angel is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-21-2003, 03:49 AM
Experienced Talker

Posts: 33
Location: Portsmouth, UK
Trades: 0
Are you using server.htmlencode during your output or during the storage of the data? If so, that will be converting your tags from <b> to &lt;b&gt;

If you're not, or don't think you are, then you can try to replace the html code as you output it to the browser anyway using

Code:
response.write replace(replace(sOutputString,"&lt;","<"),"&gt;",">")
neOnbubble is offline
Reply With Quote
View Public Profile Visit neOnbubble's homepage!
 
Old 08-21-2003, 09:01 AM
Devil's Angel's Avatar
Novice Talker

Posts: 8
Location: Nova Scotia, Canada
Trades: 0
I'm using Server.HTMLEncode.

I've set up a replace and it replaces fine but still shows the <b> tag in my content on the website. I've replaced for &lt; and &gt;...I've changed the code in the database field to [bold] and replaced to <b> in asp...still it shows <b> in my content on the website.

Devil's Angel
Devil's Angel is offline
Reply With Quote
View Public Profile
 
Old 08-21-2003, 09:26 AM
Experienced Talker

Posts: 33
Location: Portsmouth, UK
Trades: 0
Can you post a link to the webpage so we can check the browser source code?

Also, are there any other tags surrounding the output - <pre> for instance - and the output isn't in a textarea is it?
neOnbubble is offline
Reply With Quote
View Public Profile Visit neOnbubble's homepage!
 
Old 08-21-2003, 09:41 AM
Devil's Angel's Avatar
Novice Talker

Posts: 8
Location: Nova Scotia, Canada
Trades: 0
I figured out my problem. When I viewed the source it was still outputting &lt; and &gt; no matter what I changed the code to in my database.

Thanks everyone!
Devil's Angel
Devil's Angel is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Displaying HTML tags in a database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46254 seconds with 12 queries