Issue #2354397 by eshta: Add data validation for personalize elements and clean up string handling.