Proper handling of boolean HTML attributes, closes #377.