Author: borisk
Date: Wed Nov 18 10:54:34 2009
New Revision: 881717
URL: http://svn.apache.org/viewvc?rev=881717&view=rev
Log:
Skip the character that we just unescaped when searching for the next
percent sign (XERCESC-1826).
Modified:
xerces/c/trunk/src/xercesc/util/XMLURL.cpp
Modified: xerces/c/trunk/src/xercesc/util/XMLURL.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLURL.cpp?rev=881717&r1=881716&r2=881717&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLURL.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLURL.cpp Wed Nov 18 10:54:34 2009
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -193,7 +193,7 @@
CleanupType cleanup(this, &XMLURL::cleanUp);
try
- {
+ {
setURL(baseURL, relativeURL);
}
catch(const OutOfMemoryException&)
@@ -535,11 +535,11 @@
// parse the base URL string and conglomerate them.
//
if (isRelative() && baseURL && *baseURL)
- {
+ {
XMLURL basePart(fMemoryManager);
if (parse(baseURL, basePart) && conglomerateWithBase(basePart,
false))
- {
- return true;
+ {
+ return true;
}
}
else
@@ -635,7 +635,10 @@
realPath[i] = chNull;
end = i;
- percentIndex = XMLString::indexOf(realPath, chPercent,
percentIndex, fMemoryManager);
+ if (percentIndex + 1 < end)
+ percentIndex = XMLString::indexOf(realPath, chPercent,
percentIndex + 1, fMemoryManager);
+ else
+ percentIndex = -1;
}
@@ -1224,7 +1227,7 @@
//
// The first thing we will do is to check for a file name, so that
- // we don't waste time thinking its a URL. If its in the form x:\ or x:/
+ // we don't waste time thinking its a URL. If its in the form x:\ or x:/
// and x is an ASCII letter, then assume that's the deal.
//
if (((*urlText >= chLatin_A) && (*urlText <= chLatin_Z))
@@ -1485,4 +1488,3 @@
}
XERCES_CPP_NAMESPACE_END
-
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]