OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
MediaLibary Component Support
Go to bottom Favoured: 0
TOPIC: Apostrophe in Title
#565
cguyer (Visitor)
Fresh Boarder
Posts: 5
graphgraph
User Offline
Apostrophe in Title 6 Years, 7 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.
#566
cguyer (Visitor)
Fresh Boarder
Posts: 5
graphgraph
User Offline
Re:Apostrophe in Title 6 Years, 7 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.
#567
cguyer (Visitor)
Fresh Boarder
Posts: 5
graphgraph
User Offline
Re:Apostrophe in Title 6 Years, 7 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.
#568
cguyer (Visitor)
Fresh Boarder
Posts: 5
graphgraph
User Offline
Re:Apostrophe in Title 6 Years, 7 Months ago Karma: 0  
is there a function for this that is not working?
 
Logged Logged  
  The administrator has disabled public write access.
#573
admin (Admin)
Admin
Posts: 4856
graph
User Online Now Click here to see the profile of this user
Re:Apostrophe in Title 6 Years, 7 Months ago Karma: 61  
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.
#577
cguyer (Visitor)
Fresh Boarder
Posts: 5
graphgraph
User Offline
Re:Apostrophe in Title 6 Years, 7 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
What are you looking for?
Anti-spam question: How many eyes has a typical person?