⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

[SOLVED] strange output for html bold

  • @ message = "the good <b&gt example";

    the above code outputs to the textEdit...
    @the good <b&gT example@

    when it should output...
    @the good <b> example@

    is there a reason for this odd behavior. am i missing something in the code? if the code was changed to...

    @message = "the good <b&gt";@

    then the white spaces would still be removed but the <b> would be replaced with <b&gT. I have tried message.left, message.mid, and in those cases, the white spaces are still removed.

    the code does the same for html strong, eg, &lT;strong&gt, and any other html inside of &lT;and &gt.

    I need to output <b> to the textEdit. if i typed textEdit->append("<b>"); then it would not output. is there a way to type <b> with it still going to the output because &lT;and &gt just does not seem to work correctly.

  • Is your textEdit rich text or is it plain text one?

  • hi Eus. we posted at the same time. I finally discovered my error. I had a textEdit and outputting the results to that textEdit. instead, i should have had a plainTextEdit and outputting the results to it.

Log in to reply