Index: src/plugin/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -45,14 +45,15 @@
   return CFilter::contentTypeAny;
 }
 
-int WBPassthruSink::GetContentTypeFromURL(CString src)
+int WBPassthruSink::GetContentTypeFromURL(std::wstring src)
 {
-  CString srcExt = src;
+  CString srcLegacy = ToCString(src);
+  CString srcExt = srcLegacy;
 
   int pos = 0;
-  if ((pos = src.Find('?')) > 0)
+  if ((pos = srcLegacy.Find('?')) > 0)
   {
-    srcExt = src.Left(pos);
+    srcExt = srcLegacy.Left(pos);
   }
 
   int lastDotIndex = srcExt.ReverseFind('.');
@@ -90,7 +91,7 @@
 
 }
 
-int WBPassthruSink::GetContentType(CString mimeType, std::wstring domain, CString src)
+int WBPassthruSink::GetContentType(CString mimeType, std::wstring domain, std::wstring src)
 {
   // No referer or mime type
   // BINDSTRING_XDR_ORIGIN works only for IE v8+
@@ -120,10 +121,9 @@
   bool isBlocked = false;
   m_shouldBlock = false;
   m_lastDataReported = false;
-  CString src;
-  src.Append(szUrl);
-  DEBUG_GENERAL(src);
-  CPluginClient::UnescapeUrl(src);
+  std::wstring src(szUrl);
+  DEBUG_GENERAL(ToCString(src));
+  UnescapeUrl(src);
 
   std::wstring boundDomain;
   CString mimeType;
@@ -165,15 +165,15 @@
 
   if (tab && client)
   {
-    CString documentUrl = tab->GetDocumentUrl();
+    std::wstring documentUrl = tab->GetDocumentUrl();
     // Page is identical to document => don't block
     if (documentUrl == src)
     {
       // fall through
     }
-    else if (CPluginSettings::GetInstance()->IsPluginEnabled() && !client->IsWhitelistedUrl(to_wstring(documentUrl)))
+    else if (CPluginSettings::GetInstance()->IsPluginEnabled() && !client->IsWhitelistedUrl(documentUrl))
     {
-      boundDomain = to_wstring(tab->GetDocumentUrl());
+      boundDomain = tab->GetDocumentUrl();
       contentType = CFilter::contentTypeAny;
       if ((tab != 0) && (tab->IsFrameCached(src)))
       {
@@ -183,15 +183,15 @@
       {
         contentType = GetContentType(mimeType, boundDomain, src);
       }
-      if (client->ShouldBlock(to_wstring(src), contentType, boundDomain, true))
+      if (client->ShouldBlock(src, contentType, boundDomain, true))
       {
         isBlocked = true;
-        DEBUG_BLOCKER("Blocker::Blocking Http-request:" + src);
+        DEBUG_BLOCKER("Blocker::Blocking Http-request:" + ToCString(src));
       }
     }
     if (!isBlocked)
     {
-      DEBUG_BLOCKER("Blocker::Ignoring Http-request:" + src)
+      DEBUG_BLOCKER("Blocker::Ignoring Http-request:" + ToCString(src))
     }
   }
 
@@ -199,7 +199,7 @@
   if (tab == NULL)
   {
     contentType = GetContentType(mimeType, boundDomain, src);
-    if (client->ShouldBlock(to_wstring(src), contentType, boundDomain, true))
+    if (client->ShouldBlock(src, contentType, boundDomain, true))
     {
       isBlocked = true;
     }
