// make sure it starts with a letter
if (!isalpha(*it) && allowed.find(*it) >= allowed.size())
content += "x";
-
- bool mangle = false;
+
+ bool mangle = false;
for (; it != end; ++it) {
char c = *it;
if (isalpha(c) || isdigit(c) || c == '-' || c == '.' || allowed.find(c) < allowed.size())