mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 21:04:41 +00:00
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:
parent
c87485bbc5
commit
a29957d345
2 changed files with 10 additions and 10 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue