Escaping output before doing replacement in header text for AnalalyzerRenderer.

This is because the header text will already be output escaped. Therefore, if there are special characters in the header the string will not be properly replaced unless we escape the search string.