quote empty attr values

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@816 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2003-03-16 14:18:39 +00:00
parent c87485bbc5
commit a29957d345
2 changed files with 10 additions and 10 deletions

View file

@ -6949,10 +6949,6 @@ static PyObject* quote_string (PyObject* val) {
char* internal = PyString_AS_STRING(val);
int i;
PyObject* prefix;
if (len==0) {
/* its an empty string */
return val;
}
for (i=0; i<len; i++) {
if (isspace(internal[i]) ||
internal[i]=='<' ||
@ -6964,7 +6960,11 @@ static PyObject* quote_string (PyObject* val) {
replace = 1;
}
}
if (internal[len-1]=='/') {
if (len==0) {
/* its an empty string */
quote = 1;
}
else if (internal[len-1]=='/') {
quote = 1;
}
if (replace) {

View file

@ -125,10 +125,6 @@ static PyObject* quote_string (PyObject* val) {
char* internal = PyString_AS_STRING(val);
int i;
PyObject* prefix;
if (len==0) {
/* its an empty string */
return val;
}
for (i=0; i<len; i++) {
if (isspace(internal[i]) ||
internal[i]=='<' ||
@ -140,7 +136,11 @@ static PyObject* quote_string (PyObject* val) {
replace = 1;
}
}
if (internal[len-1]=='/') {
if (len==0) {
/* its an empty string */
quote = 1;
}
else if (internal[len-1]=='/') {
quote = 1;
}
if (replace) {