Login   Register  
PHP Classes
elePHPant
Icontem

Escaping "" on submit

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Form Builder  >  All threads  >  Escaping "" on submit  >  (Un) Subscribe thread alerts  
Subject:Escaping "" on submit
Summary:The form seems to escape urls with backslash when submitted
Messages:3
Author:Ranie Sauca
Date:2010-01-29 15:14:08
Update:2010-01-29 23:24:12
 

  1. Escaping "" on submit   Reply  
Picture of Ranie Sauca
Ranie Sauca
2010-01-29 15:14:08
I'm starting to change our current form submition system out for your class. I just love It. But It seems that the class is escaping " with backslashes when submitted?

Here is an example
This is in the textarea:
<a href="/assets/images/8-Logo.jpg" target="_blank">
<img src="/assets/images/8-Logo.jpg" />
</a>

This is what I get in post:
<a href=\"/assets/images/8-Logo.jpg\" target=\"_blank\">
<img src=\"/assets/images/8-Logo.jpg\" />
</a>

Any ideas? I've tried going through the class but It's pretty big for an amateur programmer ;)

But again I love this class

  2. Re: Escaping "" on submit   Reply  
Picture of Andrew P.
Andrew P.
2010-01-29 17:42:31 - In reply to message 1 from Ranie Sauca
Ranie,

First, I want to thank you for your support of this project - I'm glad you like it and are getting some good use out of it.

Secondly, in November 2009 I started migrating the project from phpclasses.org to it's new home on code.google.com. The url is http://code.google.com/p/php-form-builder-class/. I believe there has been two version releases since the migration, so I would highly recommend that you download the latest stable release from the Google Code Project Hosting site (url provided above). The project's new home has a section similar to this discussion forum for submitting issues. Please use this new section for all future communication (other than this thread of course). I don't check this forum as often so you more likely to get a faster response on the other site.

Finally, let's get to your message :). This "escaping with backslashes" is the default behavior of all html forms, whether submitted using GET or POST. In other words, there is nothing related to this form class that is causing these backslashes. There are various ways to handle removing these escaped characters. The most used would be php built in stripslashes function. You can find more info on how it is used at http://us.php.net/manual/en/function.stripslashes.php.

Good Luck,
Andrew

  3. Re: Escaping "" on submit   Reply  
Picture of Ranie Sauca
Ranie Sauca
2010-01-29 23:24:12 - In reply to message 2 from Andrew P.
Thanks for your reply! I'll get the latest and and will be monitoring this on google code from now on.

I was trying to fix It with stripslashes but didn't work, but I guess I'm going to give it a try again! ;)

Thanks again for your great work! ;)