HTML in tree nodes is already used to render page icons via SiteTree->TreeTitle. In order to select the initial value correctly via HTML5 data attributes, we need to encode any HTML values.