diff options
-rw-r--r-- | ucb/source/ucp/gio/gio_content.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 52509a361163..ac88a85cc1dd 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <rtl/uri.hxx> #include <utility> #include <string.h> @@ -1090,8 +1091,13 @@ void Content::transfer( const css::ucb::TransferInfo& aTransferInfo, const css:: if (!sDest.endsWith("/")) { sDest += "/"; } - if (aTransferInfo.NewTitle.getLength()) - sDest += aTransferInfo.NewTitle; + if (!aTransferInfo.NewTitle.isEmpty()) + { + sDest += rtl::Uri::encode( aTransferInfo.NewTitle, + rtl_UriCharClassPchar, + rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8 ); + } else sDest += OUString::createFromAscii(g_file_get_basename(getGFile())); |