OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?

MediaLibary Component Support

Go to bottom Favoured: 0

Apostrophe in Title

cguyer (Visitor)
Posts: 0
graphgraph
User Offline
Apostrophe in Title 14 Years, 10 Months ago
Karma: 0  
when an apostrophe is in the book title it is escaped with a but is never filtered out when displayed on the frontend.
Logged Logged
The administrator has disabled public write access.
cguyer (Visitor)
Posts: 0
graphgraph
User Offline
Re:Apostrophe in Title 14 Years, 10 Months ago
Karma: 0  
came up with a solution.

line 525 of booklibrary.html.php
replace the whole line.
Code:

<?php echo stripslashes($book->title); ?>


I would suggest that this gets handled in the backend as well to make it more user friendly.
Logged Logged
The administrator has disabled public write access.
cguyer (Visitor)
Posts: 0
graphgraph
User Offline
Re:Apostrophe in Title 14 Years, 10 Months ago
Karma: 0  
find other spots as well to strip slashes out.

/components/com_booklibrary/booklibrary.html.php

line 246
Code:

<?php echo stripslashes($row->title); ?> 



line 510
Code:

<?php echo stripslashes($currentcat->header); ?>



Note: on backend it looks to adds a slash ever time it saves. See what i can do next with that.
Logged Logged
The administrator has disabled public write access.
cguyer (Visitor)
Posts: 0
graphgraph
User Offline
Re:Apostrophe in Title 14 Years, 10 Months ago
Karma: 0  
is there a function for this that is not working?
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8367
graph
User Offline Click here to see the profile of this user
Re:Apostrophe in Title 14 Years, 10 Months ago
Karma: 102  
Now we check for slash - only description. For title me not do so because think ' - not uses in title. Or customer may not use it.

We do that with
//remove escaped slashes
if(get_magic_quotes_gpc()) {
$book->comment = stripslashes($book->comment);
}


for title you can add exactly so:
//remove escaped slashes
if(get_magic_quotes_gpc()) {
$book->title = stripslashes($book->title);
}

thanks,
OrdaSoft
Logged Logged
The administrator has disabled public write access.
cguyer (Visitor)
Posts: 0
graphgraph
User Offline
Re:Apostrophe in Title 14 Years, 10 Months ago
Karma: 0  
It is alot more common in the English Language which I'm guessing is not your first. And just because you don't think many would use it does not mean you shouldn't account for it. Right now it causes a problem with your component when it is used in the title and thus you should strip it out for the convenience of your customers and future customers.
Logged Logged
The administrator has disabled public write access.
Go to top
»