EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

ezPortal 6.0 released! by EzPortal
July 10, 2025, 10:50:58 pm

Re: TinyMCE Editor disapears by ezxenova
May 06, 2025, 07:38:09 am

Re: TinyMCE Editor disapears by DenDen66
March 02, 2025, 06:59:40 am

Re: TinyMCE Editor disapears by DenDen66
February 28, 2025, 08:09:43 am

Re: TinyMCE Editor disapears by DenDen66
February 28, 2025, 07:31:29 am

Re: TinyMCE Editor disapears by EzPortal
February 27, 2025, 06:57:30 pm

Re: TinyMCE Editor disapears by DenDen66
February 27, 2025, 04:45:52 pm

Re: TinyMCE Editor disapears by DenDen66
February 27, 2025, 06:15:11 am

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Recent Topics ezBlock

ezPortal 6.0 released! by EzPortal
July 10, 2025, 10:50:58 pm

TinyMCE Editor disapears by ezxenova
May 06, 2025, 07:38:09 am

Renaming a page by DenDen66
February 23, 2025, 10:51:22 am

Styling ezBlock by EzPortal
February 19, 2025, 09:15:05 pm

I don't remember how to upgrade by EzPortal
February 05, 2025, 08:44:58 am

ezPortal 5.6 release by EzPortal
January 31, 2025, 11:21:34 am

5.5.4 by EzPortal
January 16, 2025, 08:31:41 pm

Moving a block higher in list by UkuleleMan
December 17, 2024, 07:58:27 am

Mandalorian Mercs Costume Club by UkuleleMan
December 17, 2024, 07:32:20 am

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Author Topic: Corruption of PHP block data  (Read 8436 times)

0 Members and 1 Guest are viewing this topic.

Offline JohnR

  • Posts: 10
  • Karma: 1
Corruption of PHP block data
« on: July 04, 2011, 08:05:24 am »
When creating a new PHP EzBlock in the editor the block won't then run without a syntax error if it contains any backslashes (in and escaped string for example).  The reason appears to be that the block data is saved without properly escaping backslashes.   Retrieved block data has the backslashes stripped by MySQL as it thinks they are SQL escape characters (in other words it removes all backslashes from the original code).

One fix is to use $smcFunc['db_escape_string'] on the blockdata before saving it.  Alternatively use the SMF2 $smcFunc['db_insert'] and $smcFunc['db_replace'] to save the data correctly (they escape it properly before saving).

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
9252 Views
Last post December 17, 2008, 07:10:57 pm
by EzPortal
2 Replies
14428 Views
Last post July 14, 2009, 02:36:31 pm
by EzPortal
4 Replies
12903 Views
Last post January 10, 2010, 06:58:14 pm
by liza095
3 Replies
9091 Views
Last post January 26, 2010, 07:59:31 pm
by EzPortal
8 Replies
17239 Views
Last post September 22, 2015, 01:09:15 pm
by EzPortal

+-SMF Gallery

Quick Menu


Powered by EzPortal