Broken maps with quotes in restaurant names
- Quantility s.r.l.
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 26
- Thank you received: 0
8 years 6 months ago #4003
by Quantility s.r.l.
Broken maps with quotes in restaurant names was created by Quantility s.r.l.
I have found and resolved a bug in components/com_vrestaurant/views/restaurant/tmpl/default.php
I see that restaurant page don't show map, if the name have a quotes in the name like ' or ".
To solve i have add the php function php.net/manual/en/function.addslashes.php for the row ~509 where i have:
changed to
I see that restaurant page don't show map, if the name have a quotes in the name like ' or ".
To solve i have add the php function php.net/manual/en/function.addslashes.php for the row ~509 where i have:
Code:
var bubbleName ='<?php echo '<a href="'.JRoute::_('index.php?option=com_vrestaurant&view=restaurant&id='.JFactory::getApplication()->input->getInt('id')).'">'.$this->item->title.'</a>'?>';
changed to
Code:
var bubbleName ='<?php echo '<a href="'.JRoute::_('index.php?option=com_vrestaurant&view=restaurant&id='.JFactory::getApplication()->input->getInt('id')).'">'.addslashes($this->item->title).'</a>'?>';
Please Log in to join the conversation.