Fixed HTML entity handling