My Subscriptions

No active or expired subscriptions. View Available Subscriptions

News Feed

Receive our Newsletter

Advanced Search

Save $50 on your CMS Expo Registration

Receive $50 off the registration fee for the CMS Expo featuring Joomla! in Dever, Colorado (USA). Click here to register at the reduced rate.
Pages: [1]
Print
Author Topic: SOLVED: stripslashes()  (Read 468 times)
PepsimanAB
Moderator
Jr. Member
*****

Karma: +4/-0
Posts: 71


View Profile Email
« on: December 04, 2007, 02:21:17 AM »

Using:
  • Joomla 1.0.13
  • JCal 1.6.0 Beta 176
  • mod_jcalclient_latest 1.6.179 Beta
  • Apache/2.2.4 (Win32)
  • PHP/5.2.1
  • MySQL 5.0.33

I inputed "New Year's Day" as an event title, and on both the main calendar component and the latest events module, it shows as "New Year\'s Day".  It is also stored in the database with the backslash included.

Either the output should be filtered with the php stripslashes() function, or it should be stored in the database without the \. (Or I'm sure there's other ways to fix it too.) 

I don't know if there's any security issues (injection) with storing it in the database without a backslash, so I'm opting for the stripslashes route on my site.

Thanks once again for such a great product, and I look forward to  the next update.
« Last Edit: December 07, 2007, 02:25:14 PM by V-man » Logged

Anthony
*** Please read this post before posting in the forum. ***
PepsimanAB
Moderator
Jr. Member
*****

Karma: +4/-0
Posts: 71


View Profile Email
« Reply #1 on: December 04, 2007, 03:03:01 AM »

Update:
I found the function format_text, which has a true/false parameter to strip the slashes.  After changing that parameter to true in several spots (for the different views), it was showing the event without the slash.

But then I found another small problem...

I went to edit the event, and it keeps adding more slashes each time it updates the info in the database ("New Year\\\\\\\'s Day").  If I have time later, I may try to find a solution and post it here.
Logged

Anthony
*** Please read this post before posting in the forum. ***
PepsimanAB
Moderator
Jr. Member
*****

Karma: +4/-0
Posts: 71


View Profile Email
« Reply #2 on: December 04, 2007, 03:45:30 AM »

Ok, hopefully this is my last reply to this post...

In functions.inc.php, the template values for {TITLE_VAL} and {DESC_EDITOR} need to have their slashes stripped, so that they don't show up in the edit form.  (Around lines 667-669.)

Also, I forgot to mention, I'm doing the editing through the front end of the component, not through the admin section.

I won't guarantee any of my code change suggestions, seeing as how it's currently 3:45am here in Pennsylvania and I'm getting tired, but hopefully this will help the developers troubleshoot.
Logged

Anthony
*** Please read this post before posting in the forum. ***
V-man
Administrator
Hero Member
*****

Karma: +16/-3
Posts: 2408


Ignorance is curable, stupid is forever.


View Profile
« Reply #3 on: December 05, 2007, 10:49:12 AM »

Hey, great bug hunting and great post. I've confirmed this and we'll get it fixed in the next release (well, the release after the one that's almost ready Smiley )
Logged

*** Please read this post and the FAQs before posting in the forum. ***
*** Documentation links: JCal Pro | Advanced Search ***
*** Support questions via PM or e-mail will be ignored.

*** Paid Support is available through Open Source Support Desk.
PepsimanAB
Moderator
Jr. Member
*****

Karma: +4/-0
Posts: 71


View Profile Email
« Reply #4 on: December 06, 2007, 04:13:06 PM »

You're welcome if it helped you, and I can't wait until the next release (or the one that's almost ready).  JCal is one of the best components that I've found since I first learned about Joomla.  Thanks again for making such a great product.  Compared to the beta versions (and even release candidates and final versions) from other products, it seems to have so few problems that I barely even have to tweak it to make it work perfectly.  Great Job.
Logged

Anthony
*** Please read this post before posting in the forum. ***
Pages: [1]
Print
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com

Original Joomla Template design by RocketTheme ( Conversion by Bloc)