Fixing encoding on document's tags