Forum

You must be logged in to post Login Register

Search Forums:


 






Apostrophe in title or tag results in back-slash…

How do I?
UserPost

1:08 am
16 February, 2010


webservant

Parkville, MD

Guru

posts 146

Post edited 1:15 am – 16 February, 2010 by webservant
Post edited 1:20 am – 16 February, 2010 by webservant


I searched and found several have spotted this, but I see no solution. Did I miss something? If you look at this sermon: http://www.aisquith.org/audio-…..mon_id=632 you can see what I mean (in the tags).

EDIT – Apostrophes in the title don't do it. Only apostrophes in tags. I don't think anyone noticed because, up until a couple of days ago, tags didn't display on the Sermon page.

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org

6:25 am
18 February, 2010


mvejvoda

Prince George, BC Canada

Enthusiast

posts 15

Ok here is the fix:

frontend.php

(again) and goto the function:

function sb_print_tags($tags)

and change it to look like this:

// Prints tags
function sb_print_tags($tags) {
$out = array();
foreach ((array) $tags as $tag)
$out[] = '<a href="'.sb_get_tag_link($tag).'">'.stripslashes($tag).'</a>';
$tags = implode(', ', (array) $out);
echo $tags;
}

2:11 am
25 February, 2010


webservant

Parkville, MD

Guru

posts 146

mvejvoda said:

Ok here is the fix:

frontend.php

(again) and goto the function:

function sb_print_tags($tags)

and change it to look like this:

// Prints tags
function sb_print_tags($tags) {
$out = array();
foreach ((array) $tags as $tag)
$out[] = ''.stripslashes($tag).'';
$tags = implode(', ', (array) $out);
echo $tags;
}

That does prevent apostrophes from showing as slashes… but there is something weirder going on. Go to my site (it's HERE), type in "Lord's Supper" and click "go". It replaces the apostrophe with slashes, and doesn't find any sermons.

Rich Brown Webmaster, Aisquith Presbyterian Church Parkville, Maryland, USA sermons.aisquith.org

2:08 pm
13 April, 2010


guar

New Member

posts 2

I get the same issue with the title search – I removed the wpdb->escapes (line 744 sermon) from the query and put in stripslashes on the form field (line 995 frontend) and shortcode atts array (line 465 sermon). Now, even though the results claim to have found a record, there is nothing in the sermon's array. So, close but no bananas.

I also had an issue when the Speaker's name had an apostrophe in the active filter – this also required a stripslashes in the frontend file (line 890 frontend).


About the 4:14 evangelical christian theology blog forum

Most Users Ever Online:

19


Forum Stats:

Groups: 1

Forums: 6

Topics: 544

Posts: 2106




Popularity: 37% [?]