From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- toolkit/components/places/BookmarkHTMLUtils.jsm | 1188 +++++++++++++++++++++++ 1 file changed, 1188 insertions(+) create mode 100644 toolkit/components/places/BookmarkHTMLUtils.jsm (limited to 'toolkit/components/places/BookmarkHTMLUtils.jsm') diff --git a/toolkit/components/places/BookmarkHTMLUtils.jsm b/toolkit/components/places/BookmarkHTMLUtils.jsm new file mode 100644 index 000000000..a009a5e7c --- /dev/null +++ b/toolkit/components/places/BookmarkHTMLUtils.jsm @@ -0,0 +1,1188 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/** + * This file works on the old-style "bookmarks.html" file. It includes + * functions to import and export existing bookmarks to this file format. + * + * Format + * ------ + * + * Primary heading := h1 + * Old version used this to set attributes on the bookmarks RDF root, such + * as the last modified date. We only use H1 to check for the attribute + * PLACES_ROOT, which tells us that this hierarchy root is the places root. + * For backwards compatibility, if we don't find this, we assume that the + * hierarchy is rooted at the bookmarks menu. + * Heading := any heading other than h1 + * Old version used this to set attributes on the current container. We only + * care about the content of the heading container, which contains the title + * of the bookmark container. + * Bookmark := a + * HREF is the destination of the bookmark + * FEEDURL is the URI of the RSS feed if this is a livemark. + * LAST_CHARSET is stored as an annotation so that the next time we go to + * that page we remember the user's preference. + * WEB_PANEL is set to "true" if the bookmark should be loaded in the sidebar. + * ICON will be stored in the favicon service + * ICON_URI is new for places bookmarks.html, it refers to the original + * URI of the favicon so we don't have to make up favicon URLs. + * Text of the container is the name of the bookmark + * Ignored: LAST_VISIT, ID (writing out non-RDF IDs can confuse Firefox 2) + * Bookmark comment := dd + * This affects the previosly added bookmark + * Separator := hr + * Insert a separator into the current container + * The folder hierarchy is defined by
/