aboutsummaryrefslogtreecommitdiff
path: root/www/api/export_html.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2010-08-12 20:49:35 +0200
committerChristian Weiske <cweiske@cweiske.de>2010-08-12 20:49:35 +0200
commit0a8dadf87e660e9bf205581f12f7af87bfabf6ca (patch)
treea1218f869401a1ffff764a58c28a0be674ba5362 /www/api/export_html.php
parentb25290cef48251a31cb0f693a53677b566c1b1a4 (diff)
parent31570df64ce6543de407e7b9d751ba9033d930de (diff)
downloadsemanticscuttle-0a8dadf87e660e9bf205581f12f7af87bfabf6ca.tar.gz
semanticscuttle-0a8dadf87e660e9bf205581f12f7af87bfabf6ca.tar.bz2
Merge branch 'master' into pearpkg
Diffstat (limited to 'www/api/export_html.php')
-rw-r--r--www/api/export_html.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/www/api/export_html.php b/www/api/export_html.php
index 8d70927..c7c8cf4 100644
--- a/www/api/export_html.php
+++ b/www/api/export_html.php
@@ -3,6 +3,9 @@
* Implements the del.icio.us API request for all a user's posts,
* optionally filtered by tag.
*
+ * Netscape bookmark file format is documented at
+ * http://msdn.microsoft.com/en-us/library/aa753582(VS.85).aspx
+ *
* SemanticScuttle - your social bookmark manager.
*
* PHP version 5.
@@ -27,7 +30,8 @@ $bookmarkservice = SemanticScuttle_Service_Factory::get('Bookmark');
// Check to see if a tag was specified.
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) {
- $tag = trim($_REQUEST['tag']);
+ //$_GET vars have + replaced to " " automatically
+ $tag = str_replace(' ', '+', trim($_REQUEST['tag']));
} else {
$tag = null;
}
@@ -45,7 +49,7 @@ echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" />';
echo '<!-- This is an automatically generated file. -->'."\r\n";
echo '<TITLE>Bookmarks</TITLE>'."\r\n";
echo '<H1 LAST_MODIFIED="'. date('U') .'">Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."</H1>\r\n";
-echo '<DL><p>'."\r\n";
+echo '<DL>'."\r\n";
@@ -67,9 +71,9 @@ foreach ($bookmarks['bookmarks'] as $row) {
$taglist = 'system:unfiled';
}
- echo "\t<dt><a href=\"". filter($row['bAddress'], 'xml') .'" '. $description .' hash="'. md5($row['bAddress']) .'" tags="'. filter($taglist, 'xml') .'" ADD_DATE="'. date('U', strtotime($row['bDatetime'])) ."\" >" . filter($row['bTitle'], 'xml') ."</a>\r\n";
+ echo "\t<DT><A HREF=\"". filter($row['bAddress'], 'xml') .'" '. $description .' hash="'. md5($row['bAddress']) .'" tags="'. filter($taglist, 'xml') .'" ADD_DATE="'. date('U', strtotime($row['bDatetime'])) ."\" >" . filter($row['bTitle'], 'xml') ."</a>\r\n";
}
-echo '</DL><p>';
+echo '</DL>';
?>