Content grabber: Improve encoding detection and cleanup rules