how to display column data as html value in report, if html tags present in data

(2 posts) (2 voices)

Tags:

No tags yet.

  1. shiva_dbr, Member

    Hi mydbrteam,

    so in my MYDBR reports, I have a particular column which has data containing plain text values for certain rows , whereas it also has html tags and plain text in some rows. I Want to know what's the best way to render the data on frontend as html and not plain text .

    the column contains data in similar format - "some text some url some text "

    I tried below attached code snippets however they don't work as expected .

    1) select tablename.columnname as 'dbr.html:columnname ';

    2) select 'dbr.html', 'columnname ';
    select 'dbr.url', 'columnname ';

    Please suggest a way to achieve this in mydbr?

  2. myDBR Team, Key Master

    Depending on if you trust the HTML data or not you can use either dbr.html: or dbr.html.ext:.

    For safe data you can use:

    select concat('dbr.html:', columnname) as 'Column name'
    from tablename

    For external unsafe data you should use:

    select concat('dbr.html.ext:', columnname) as 'Column name'
    from tablename

    --
    myDBR Team


Reply

You must log in to post.