Perform better checking on tag names.  empty() is not a good function to use when processing POST data.