Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

xml search results - stripping backslashes?

Quote Reply
xml search results - stripping backslashes?
I know this has been discussed somewhat, but I've tried everything and can't seem to find the solution I need.

What I've done is integrated Editize WYSIWYG editor into LinksSQL (added it to the include_form template for PHP)and it's working GREAT except that I'm having a problem with magic quotes adding the backslashes before my quotes in any URL's, etc.

Code:

example <a href=\"URL_HERE\" target=\"_blank\">SITE_NAME_HERE</a>


Is there a built in way to strip these slashes (with CGI.pm maybe?) before the search displays the XML results? A tag I can add to my xml file?

It doesn't seem to be a problem anywhere else...just the XML search results plugin.

THanks!

Last edited by:

bnjp: Mar 13, 2004, 11:57 AM
Quote Reply
Re: [bnjp] xml search results - stripping backslashes? In reply to
No, I was wrong. it is a problem with the regular search as well.

Question is: is it better to teach the "add" and "modify" not to add the quotes, or teach the search.cgi to strip them?

Any tips on doing either one?
Quote Reply
Re: [bnjp] xml search results - stripping backslashes? In reply to
okay...this seemed to work on the "add" form, but not on the "modify" form. ??

Code:

<?php
set_magic_quotes_runtime(1);
?>

Last edited by:

bnjp: Mar 19, 2004, 6:20 AM
Quote Reply
Re: [bnjp] xml search results - stripping backslashes? In reply to
I'm getting there. Looks like modify.inc.php does the "addslashes" routine, but add.inc.php does not. Why is that?

Is it vital that the slashes be there in the database? Seems to work without them. Am I digging a grave for myself not using the slashes?
Quote Reply
Re: [bnjp] xml search results - stripping backslashes? In reply to
>> Am I digging a grave for myself not using the slashes?

You are digging your grave by using the .php version, not the perl version ;)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] xml search results - stripping backslashes? In reply to
okay...fair enough. I have found some limitations with PHP. So what is the difference in the way the PHP version and the Perl version stores info in the database? Does the Perl version add slashes? I know it doesn't strip them when it displays the content.
Quote Reply
Re: [bnjp] xml search results - stripping backslashes? In reply to
I don't think it's in the database, but in the php front end.

Will page.cgi do what you want? If so, it's in the php front end.

I have not had problems with storing characters in the database, but then I may not be specifically looking at those.

And, yes, perl and php *are* different in how they handle things. The perl side is much, much cleaner over all.

Part of this is the efforts of GT on the perl interface/engine, and part is due to perl itself vs php.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.