Welcome to WebmasterWorld Guest from 50.17.5.36

Forum Moderators: phranque

Message Too Old, No Replies

I can't use form text areas with my site. How to present code to users?

     
4:03 pm on Sep 25, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 1, 2006
posts: 93
votes: 0


I need to provide code for visitors/users to copy and paste (I'm asking people who want to link to our site to use an image hosted on our site) ... but, unfo, this particular CMS site does not allow me use a form and text areas in which I would normally present the code.

Do you know of another way to present code without using scripts (which are also verbotten in this particular instance)?

4:57 pm on Sept 25, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


The problem is the quotes and carats, and sometimes ampersands (rarely, if the previous are addressed.) The right way is to encode quotes and carats with html entities (", <, >, &) in the CMS programming before they are stored anywhere.

If you can't modify it, perhaps you can write/locate some Javascript that converts the quotes and carats to entities before submitting.

6:16 pm on Sept 25, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:July 1, 2006
posts:93
votes: 0


Thanks, Bill ... I encoded the HTML characters within a DIV. I was worried the CMS would freak out on them but it worked like a charm!