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