1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-01-20 16:52:10 +01:00

Merge pull request #100 from owncloud/disable-entity-loader

Disable entity loader
This commit is contained in:
Lukas Reschke 2014-11-05 17:16:52 +01:00
commit d9675e60b3

View File

@ -408,6 +408,7 @@ class OC_Bookmarks_Bookmarks{
public static function importFile($file){ public static function importFile($file){
libxml_use_internal_errors(true); libxml_use_internal_errors(true);
$loadEntities = libxml_disable_entity_loader(true);
$dom = new domDocument(); $dom = new domDocument();
$dom->loadHTMLFile($file); $dom->loadHTMLFile($file);
@ -429,6 +430,7 @@ class OC_Bookmarks_Bookmarks{
self::addBookmark($ref, $title, $tags,$desc_str ); self::addBookmark($ref, $title, $tags,$desc_str );
} }
OCP\DB::commit(); OCP\DB::commit();
libxml_disable_entity_loader($loadEntities);
return array(); return array();
} }