Are HTML + carriage returns stripped?

(4 posts) (2 voices)

Tags:

No tags yet.

  1. duane, Member

    Hi. I have an editable report in which some fields (varchar) can be updated. I want to allow HTML and carriage returns, but it seems these are stripped out - is that correct?

    If so, is there any way to prevent them being stripped out so they can be stored?

  2. myDBR Team, Key Master

    Duane,
    the carriage returns (newlines) are preserved. There is two things you need to take into account: presentation and the editing type.

    To keep newlines in a report, assign CSS style "white-space: pre;" to the column (HTML will by default collapse whitespaces and newlines are treated as another whitespace). To make sure newlines are kept during editing use editable type autosize or textarea.

    --
    myDBR Team

  3. duane, Member

    Thanks - that helped me narrow down some possibilities. Also white-space:pre-wrap was even better:-)

    I think I found a bug. When the text has a apostrophe (') in it, it will update, but remove all the newlines. When it doesn't it updates fine. Let me know if this makes sense.

  4. myDBR Team, Key Master

    Apostrophes should work as any other characters. We do not seem to be able reproduce the problem. Could you contact support for more details.

    --
    myDBR Team


Reply

You must log in to post.