Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

The variables are modified when I insert them in the URL
https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=3745
Page 1 of 1

Author:  mucikiki [ 12. Oct 2014, 20:01 ]
Post subject:  The variables are modified when I insert them in the URL

Hi Michael,

I bought you Pro version, there is a problem in the variables that I include in the URL. If the value contains:

' it is transform in \'
" in \"

If I do the same with the orginal page there is no problem, so I think it is caused by the plugin. What could I do?

Thank you for your help!

Ale

Author:  TinyWebGallery [ 12. Oct 2014, 20:15 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Do you talk about ' or " inside the src attribute?

They are escaped with esc_url because otherwise I cannot enter them into the iframe parameter.

Can you give an example because e.g. <iframe src="http://ddd.ccc/?param=as"df"> would be invalid...

Best,
Michael

Author:  mucikiki [ 12. Oct 2014, 20:24 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Sure, for example in this case you see the correct one:

xxx

As you can see:
D'Onofrio
Centro "Sorriso"

If I insert this page in the frame I see this:

xxx

Now it is:
D\'Onofrio
Centro \"Sorriso\"

Author:  TinyWebGallery [ 12. Oct 2014, 20:33 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Do you enter it in the administration or the src attribut?

Because in the administration I do the escaping because of securtiy reasons.
Best, Michael

Author:  mucikiki [ 12. Oct 2014, 20:41 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Hi insert the code in the page:

[advanced_iframe securitykey="xxx" src="xxx"]

Did you refer to this?

Ale

Author:  TinyWebGallery [ 12. Oct 2014, 20:58 ]
Post subject:  Re: The variables are modified when I insert them in the URL

o.k. - if you foreward url parameters I do url encode them also.

If you don't want this you need to modify

function param in advanced_iframe.php.

and return the value directly.

Author:  mucikiki [ 12. Oct 2014, 21:07 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Thank you for your help.

I don't understand what you want to say in "if you forward url parameters I do url encode them also."

In my code I'm using the command urlencode so I think that the url parameters are encoded.

Or do you refer something different?

Author:  TinyWebGallery [ 12. Oct 2014, 21:42 ]
Post subject:  Re: The variables are modified when I insert them in the URL

All parameters for url_forward_parameter are decoded and encoded again. This might not be the best way for your purpose.
So you might check the function I have written and return the value directly.

Best, Michael

Author:  TinyWebGallery [ 12. Oct 2014, 22:16 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Maybe the server where you have the parent does the escaping! If this is the case you need to unescape the values.

You need to use stripcslashes than. Check if you have set magic_quotes_gpc "on" on your server...

Best, Michael

Author:  mucikiki [ 13. Oct 2014, 02:08 ]
Post subject:  Re: The variables are modified when I insert them in the URL

Great!

You're right, I resolved everything using stripslashes in my code, so I don't modify your file but my ones!

Thank you very much for your help!

Ale

Author:  TinyWebGallery [ 13. Oct 2014, 09:22 ]
Post subject:  Re: The variables are modified when I insert them in the URL

great.

Best, Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/