html.c: extracted function getAttributeValue