SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old October 26th, 2006, 05:45 PM
crazycondor crazycondor is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 23 crazycondor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 50 sec
Reputation Power: 0
Angry Rich Text Editor - Backslash & Quotes Problem

Hi All,

I need a free Rich Text Editor for a CMS and after a lot of searching i decided to use "HTML Rich Text Area". So far so good.

The problem is that when i use quotes, double quotes or backslashes as text everything becomes a mess.

I replaced (") with (\"), (') with (\') (i use PHP) and so on but the editor returns something like this \\\''\''\\''\'\'\'\'\'\.

Is it possible to avoid this and how?

Help me please!!

Reply With Quote
  #2  
Old October 26th, 2006, 08:20 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 471 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 9 m 44 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
im not sure what you mean by "rich text editor" but you could make use of escape() and unescape() consitering that all those could be converted to the escape format. ie: [space] = %20

hope that helps a little,

colton22

Reply With Quote
  #3  
Old October 26th, 2006, 10:51 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 541 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 2 h 15 m 6 sec
Reputation Power: 3
text editor

The problem with using someone else's code is that you have to learn how to use it before you know if it does what you want it to and doesn't do what you don't want it to. Are you using the tcp/IQ app? If so it may be worth the effort to contact them for support.
In any case if you feel confident in your skills you could save back-up files of the app and try modifying the source. Take a look at it any way to see what it's doing.
My guess is that it's adding slashes to "special" characters. The backslash is one of these, so entering a \ before another special character will result in \\\"
You could try escape as colton22 suggested, another thing would be entities like < for < or " for " etc.

Reply With Quote
  #4  
Old October 27th, 2006, 01:55 AM
crazycondor crazycondor is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 23 crazycondor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 50 sec
Reputation Power: 0
That's right Mittineague. I'm using the tcp/iq app.

The problem is that i don't feel very confident in my javascript skills.

Can you suggest me any other app;

Thanks for the you time guys.

Reply With Quote
  #5  
Old October 29th, 2006, 08:41 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 471 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 9 m 44 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
what you can do if you want to use the escape or unescape, i made something...

Code:
<HTML>
<HEAD>
<SCRIPT>
function encode(form,inp,outp) {
if (inp!="") {form.outp.value=escape(inp);}
else 		 {form.inp.value=unescape(outp);}
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#000000">
<FORM NAME="info">
<TEXTAREA NAME="inp" ROWS="20" COLS="100"></TEXTAREA>
<BR /><INPUT TYPE="button" VALUE="Encode!" ONCLICK="encode(window.document.info,window.document.info.i  np.value,window.document.info.outp.value)" /><BR />
<TEXTAREA NAME="outp" ROWS="20" COLS="100"></TEXTAREA>
</FORM>
</BODY>
</HTML>


copy it to a html file and run it, it will have you enter text in the top textarea, you press convert and it will convert it to the escaped way. if you delete the contents of the top box, and insert escaped text to the bottom, it will unescape it (decode it) and place the outcome to the top box.

what did you want this for? i could make a function to do this for you

colton22

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Rich Text Editor - Backslash & Quotes Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway