- Disallowed @ and / from an attribute name or modifier.  This causes
  input like 'user@host:path' to now be parsed as description, and not
  as an unrecognized attribute.
This commit is contained in:
Paul Beckingham 2011-02-04 12:14:52 -05:00
parent 783a326b11
commit 036d77e08f
4 changed files with 39 additions and 23 deletions

View file

@ -205,14 +205,18 @@ bool Att::valid (const std::string& input) const
if (!n.getUntilOneOf (".:", ignored))
return false;
if (n.skip (':') &&
(n.getQuoted ('"', ignored) ||
n.getUntil (' ', ignored) ||
n.getUntilEOS (ignored) ||
n.depleted ()))
return true;
if (n.skip (':'))
{
if (input.find ('@') <= n.cursor () ||
input.find ('/') <= n.cursor ())
return false;
return false;
if (n.getQuoted ('"', ignored) ||
n.getUntil (' ', ignored) ||
n.getUntilEOS (ignored) ||
n.depleted ())
return true;
}
}
return false;