Solved

Replace Typed Dashes in Paragraph with HTML

Posted on 2004-09-18
4
211 Views
Last Modified: 2013-12-24
Hi I have this in my Sql UPDATE statement:

Description='#Replace(form.Description, chr(13) & chr(10), "<br>","ALL",)#'

so that I can replace carriage returns in my <textarea> with <br> for input into the database.  I would also like to replace all dashes (-) typed into the textarea with the proper thing so that I won't get a little square in the paragraph on output.  How? I should mention these are not regular dashes but are the long ones--I don't know what they are called.
0
Comment
Question by:champ_010
  • 2
4 Comments
 
LVL 21

Expert Comment

by:pinaldave
ID: 12095714
okey they may be combination of many dashes... in world when there are two or three dashes toghether looks like big horizontal dashes... so you need to replace them with many dashes...
Tha ascii of dash will be &#150;
if due to some reason they are big dash then try this big dash ascii &#151;
hope this helps...
Regards,
---Pinal
0
 
LVL 17

Accepted Solution

by:
anandkp earned 100 total points
ID: 12099526
Why not use CFQueryParam to insert the text entered in textarea ... it shld allow u to insert things as entered by the user ...

UR Sql UPDATE statement wld be like :
Description = <CFQueryParam CFSQLTYPE="CF_SQL_VARCHAR" VALUE="#form.Description#">

lemme know if this helps ...
0
 
LVL 1

Author Comment

by:champ_010
ID: 12114709
Thanks--learned something new again.
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 12115054
I learn everytime from AnandKP :)
---Pinal
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Troubleshoot mediawiki <-> ActiveDirectory authentication 2 111
PHP Register global 21 77
JVM encoding. How to change encoding. 27 84
listing all functions in JavaScript 19 176
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now