mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-02-22 19:54:24 +01:00
Fix Null titles and title with quotes from backend request fix #18
This commit is contained in:
parent
3d44474eb4
commit
37a036c166
@ -279,7 +279,10 @@ function updateBookmarksList(bookmark, position) {
|
||||
if(bookmark.added) {
|
||||
bookmark.added_date.setTime(parseInt(bookmark.added)*1000);
|
||||
}
|
||||
|
||||
|
||||
if(! bookmark.title)
|
||||
bookmark.title ='';
|
||||
|
||||
html = tmpl("item_tmpl", bookmark);
|
||||
if(position == "prepend") {
|
||||
$('.bookmarks_list').prepend(html);
|
||||
|
@ -435,7 +435,7 @@ class OC_Bookmarks_Bookmarks{
|
||||
if($page) {
|
||||
if(preg_match( "/<title>(.*)<\/title>/sUi", $page, $match ) !== false)
|
||||
if(isset($match[1])) {
|
||||
$metadata['title'] = html_entity_decode($match[1], ENT_NOQUOTES , 'UTF-8');
|
||||
$metadata['title'] = html_entity_decode($match[1], ENT_QUOTES , 'UTF-8');
|
||||
//Not the best solution but....
|
||||
$metadata['title'] = str_replace('™', chr(153), $metadata['title']);
|
||||
$metadata['title'] = str_replace('‐', '‐', $metadata['title']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user