A bit stupid of my part, the string was actually filled with \n and double quotes, I needed to replace all these characters for the html string to be normally formatted