simpledatamodeladapter/src/presencepluginwatcher.cpp
branchRCL_3
changeset 9 de84881f4ac3
parent 6 aca99fb8a3dd
child 14 e53c01f160bc
--- a/simpledatamodeladapter/src/presencepluginwatcher.cpp	Wed Apr 14 16:22:17 2010 +0300
+++ b/simpledatamodeladapter/src/presencepluginwatcher.cpp	Tue Apr 27 17:03:39 2010 +0300
@@ -29,6 +29,7 @@
 #include <ximpobjectcollection.h>
 #include <ximpobjectfactory.h>
 #include <presenceobjectfactory.h>
+#include <escapeutils.h>
 
 #include "presencepluginvirtualgroup.h"
 #include "mpresencepluginconnectionobs.h"
@@ -139,11 +140,16 @@
     pres8 =
         CnvUtfConverter::ConvertFromUnicodeToUtf8L( iPresIdentity->Des() );
     CleanupStack::PushL( pres8 ); // << pres8
-        
+    
+    // remove escapes
+    HBufC8* encodedUsername = EscapeUtils::EscapeEncodeL( *pres8, EscapeUtils::EEscapeNormal );
+    CleanupStack::PopAndDestroy( pres8 );
+    CleanupStack::PushL( encodedUsername );
+    
     CPresencePluginEntityWatcher* watcher =
-        MatchWatcherL( pres8->Des(), ETrue );      
-    watcher->StartSubscribeL( pres8->Des(), aStatus );
-    CleanupStack::PopAndDestroy( pres8 );  // >> pres8
+        MatchWatcherL( encodedUsername->Des(), ETrue );      
+    watcher->StartSubscribeL( encodedUsername->Des(), aStatus );
+    CleanupStack::PopAndDestroy( encodedUsername );
     }
 
 // ---------------------------------------------------------------------------