Fixes to id parser to make it more compatible with htmlsections.