Fixed Nabi Issues 52332,54256,54601,54130,54264,54471
[apps/osp/Internet.git] / src / IntBookmarkPresentationModel.cpp
index 891723c..1311fbb 100644 (file)
@@ -1253,22 +1253,24 @@ BookmarkPresentationModel::DoesBookmarkExist(const Tizen::Base::String& Url, boo
        result r = E_FAILURE;
        bool nextRowPresent = false;
        int count = 0;
+       String tempURL = Url;
+       tempURL.Replace(L"'", L"''");
 
        query.Append(L"SELECT COUNT(ID) FROM ");
        query.Append(bookmarkTable);
        query.Append(" WHERE ADDRESS = '");
-       query.Append(Url);
-       if(Url.EndsWith(L"/"))
+       query.Append(tempURL);
+       if(tempURL.EndsWith(L"/"))
        {
                query.Append("' OR ADDRESS = '");
                String newUrl = L"";
-               Url.SubString(0,Url.GetLength()-1 ,newUrl);
+               tempURL.SubString(0,tempURL.GetLength()-1 ,newUrl);
                query.Append(newUrl);
        }
        else
        {
                query.Append("' OR ADDRESS = '");
-               String newUrl = Url;
+               String newUrl = tempURL;
 //             Url.SubString(0,Url.GetLength()-1 ,newUrl);
                newUrl.Append(L"/");
                query.Append(newUrl);
@@ -1302,7 +1304,7 @@ BookmarkPresentationModel::DoesBookmarkExist(const Tizen::Base::String& Url, boo
        {
                exist = true ;
        }
-
+       tempURL.Replace(L"''",L"'");
        CATCH: return r;
 }