summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-17 14:13:58 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-17 14:13:58 +0000
commitc04cd3958af89d9ececff5427da89cd1e7d1855f (patch)
tree5da751566c6770867677a3d1333dce9b940b18f6 /extensions/source
parent2910027afd30c9984069e4f4d754b4efe5c37f58 (diff)
INTEGRATION: CWS vcl08 (1.6.84); FILE MERGED
2003/04/07 18:00:09 pl 1.6.84.1: #108596# workaround funny javascript urls
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index 3302052116f8..80ec2600f0ec 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: nfuncs.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 16:17:20 $
+ * last change: $Author: rt $ $Date: 2003-04-17 15:13:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,7 +129,7 @@ NPNetscapeFuncs aNPNFuncs =
static ::rtl::OString normalizeURL( XPlugin_Impl* plugin, const ::rtl::OString& url )
{
::rtl::OString aLoadURL;
- if( url.indexOf( ":/" ) == -1 )
+ if( url.indexOf( ":" ) == -1 )
{
aLoadURL = ::rtl::OUStringToOString( plugin->getCreationURL(), plugin->getTextEncoding() );
int nPos;
@@ -154,7 +154,7 @@ static ::rtl::OString normalizeURL( XPlugin_Impl* plugin, const ::rtl::OString&
else
aLoadURL = url;
}
- else
+ else if( url.indexOf( ":/" ) != -1 )
aLoadURL = url;
return aLoadURL;
@@ -245,6 +245,9 @@ extern "C" {
return NPERR_INVALID_INSTANCE_ERROR;
::rtl::OString aLoadURL = normalizeURL( pImpl, url );
+ if( !aLoadURL.getLength() )
+ return NPERR_INVALID_URL;
+
PluginEventListener* pListener =
new PluginEventListener( pImpl, url, aLoadURL.getStr(), notifyData );
if( ! target || ! *target )