Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
Apostrophe in title or tag results in back-slash...
16 February, 2010
1:08 am
Rich Brown
Parkville, MD
Guru
Forum Posts: 306
Member Since:
13 July, 2009
Offline

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
Aisquith Presbyterian Church
Parkville, Maryland, USA
sermons.aisquith.org
18 February, 2010
6:25 am
mvejvoda
Prince George, BC Canada
Enthusiast
Forum Posts: 15
Member Since:
9 February, 2010
Offline

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;
}
25 February, 2010
2:11 am
Rich Brown
Parkville, MD
Guru
Forum Posts: 306
Member Since:
13 July, 2009
Offline

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
Aisquith Presbyterian Church
Parkville, Maryland, USA
sermons.aisquith.org
13 April, 2010
2:08 pm
guar
New Member
Forum Posts: 2
Member Since:
13 April, 2010
Offline

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).

25 March, 2012
11:34 pm
CoolHappyGuy
Bloomington, IL USA
Enthusiast
Forum Posts: 13
Member Since:
27 February, 2012
Offline

Rich Brown said

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.

I made this change but I still get the slash in my tag name.

Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

malpan: 2453

jogen: 2440

VanWatterson: 652

GeraldSebring: 364

LucasWoltman: 362

RandellFeenstra: 362

Member Stats:

Guest Posters: 7

Members: 2062

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1071

Posts: 4042

Newest Members: richdorm, Aaron Velasquez, aaronv, dave5884, tomduckering, ccwebb

Moderators: Ben Miller (386)

Administrators: Mark Barnes (425)

Comments are closed.