|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
VBScript - General - Question - Quotation
Hi there
On the company in house website application I've a text field where users can add comments. The problem is some users when about sizes put a number following quotation (ex: 75") and when the comments are displayed using ie it changes all the site layout. I've tried to uses a replace (ex: replace(variable, """, "''") ) but it didn't work. Is there any solution for this please? Thanks
__________________
If this help you please show your gratitude by adding reputation points. Thanks JonyBravo |
|
#2
|
||||
|
||||
|
You might try
response.write (Server.HtmlEncode(variable)) Just a guess.
__________________
Fremen United! Folding@Home team ID 169647. If you aren't on a team, join this one and we'll rule the world! |
|
#3
|
|||
|
|||
|
Quote:
Instead of: Code:
variable = replace(variable, """, "''") Try this: Code:
variable = replace(variable, CHR(34), "''") Keep in mind that you may have trouble if you are going to store your data in a database. Many databases have trouble with single quotes ('). |
|
#4
|
||||
|
||||
|
since you are displaying then try using mike's suggestion...i believe it will 'display' with the html's 'ampersand quot;' versus "...
i do not think you will need to 'replace' anything..let us know ![]()
__________________
Please give respect to those that helped solve an issue by clicking on the reputation icon
Last edited by keep_it_simple : November 17th, 2009 at 11:57 PM. |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > VBScript - General - Question - Quotation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|