From 54cc547050faded7e2b9918cf0c8839360add704 Mon Sep 17 00:00:00 2001 From: stippi Date: Sun, 25 Apr 2010 13:45:05 +0000 Subject: [PATCH] Make sure a filename derived from a bookmark title does not contain invalid characters for a filename. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@461 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 8b0a15d526..e5988d1833 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -1193,6 +1193,9 @@ BrowserWindow::_CreateBookmark() if (leafPos >= 0) bookmarkName.Remove(0, leafPos + 1); } + // Make sure the bookmark title does not contain chars that are not + // allowed in file names. + bookmarkName.ReplaceAll('/', '-'); // Check that the bookmark exists nowhere in the bookmark hierarchy, // though the intended file name must match, we don't search the stored