summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-05-19 13:37:40 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-05-19 13:37:40 +0000
commit6d6343d74ae51fff6cf1744187fda76bb840a6a4 (patch)
treed94720aed97ff876626834778c9b870b1fed91ca
parent66ad0634e224d660e9a6f3c829cd129185321527 (diff)
downloadsemanticscuttle-6d6343d74ae51fff6cf1744187fda76bb840a6a4.tar.gz
semanticscuttle-6d6343d74ae51fff6cf1744187fda76bb840a6a4.tar.bz2
bug fix: improve behaviour for Excel import
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@327 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--api/export_csv.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/api/export_csv.php b/api/export_csv.php
index d9d824b..2389642 100644
--- a/api/export_csv.php
+++ b/api/export_csv.php
@@ -17,18 +17,18 @@ else
// Get the posts relevant to the passed-in variables.
$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());
-header("Content-Type: application/csv-tab-delimited-table");
+header("Content-Type: application/csv-tab-delimited-table;charset=UTF-8");
header("Content-disposition: filename=exportBookmarks.csv");
//columns titles
-echo 'url,title,tags,description';
+echo 'url;title;tags;description';
echo "\n";
foreach($bookmarks['bookmarks'] as $row) {
if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
$description = '';
else
- $description = filter($row['bDescription'], 'xml');
+ $description = filter(str_replace(array("\r\n", "\n", "\r"),"", $row['bDescription']), 'xml');
$taglist = '';
if (count($row['tags']) > 0) {
@@ -39,7 +39,7 @@ foreach($bookmarks['bookmarks'] as $row) {
$taglist = 'system:unfiled';
}
- echo '"'.filter($row['bAddress'], 'xml') .'","'. filter($row['bTitle'], 'xml') .'","'. filter($taglist, 'xml') .'","'. $description .'"';
+ echo '"'.filter($row['bAddress'], 'xml') .'";"'. filter($row['bTitle'], 'xml') .'";"'. filter($taglist, 'xml') .'";"'. $description .'"';
echo "\n";
}