Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Replace Typed Dashes in Paragraph with HTML

Posted on 2004-09-18
4
Medium Priority
?
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

618 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