fix content replacement in elements