summaryrefslogtreecommitdiffstats
path: root/strings.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-24 13:46:54 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-24 13:46:54 +0000
commit38fefdf005d8237391f4aabfb145c4a96d930b8b (patch)
tree3140d1ac71c9d4d0d8ed643bc9937302d4cf9379 /strings.c
parentc8bf126a0b893c247fa4ec7b271fa51308fe257f (diff)
downloadmandoc-38fefdf005d8237391f4aabfb145c4a96d930b8b.tar.gz
Character-encoding checked for all text (arguments/values).
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/strings.c b/strings.c
index 3e9415c5..2ca3de93 100644
--- a/strings.c
+++ b/strings.c
@@ -55,14 +55,16 @@ mdoc_isescape(const char *p)
/* FALLTHROUGH */
case (' '):
/* FALLTHROUGH */
+ case ('&'):
+ /* FALLTHROUGH */
case ('.'):
/* FALLTHROUGH */
case ('e'):
return(2);
case ('('):
- if (0 == *++p)
+ if (0 == *++p || ! isgraph(*p))
return(0);
- if (0 == *++p)
+ if (0 == *++p || ! isgraph(*p))
return(0);
return(4);
case ('['):
@@ -72,7 +74,7 @@ mdoc_isescape(const char *p)
}
for (c = 3, p++; *p && ']' != *p; p++, c++)
- if (isspace(*p))
+ if ( ! isgraph(*p))
break;
return(*p == ']' ? c : 0);