HTML displaying from MySQL


I have a MySQL database connected to my App. When I display the content, I want :

  • to transform URL in text in order to click on. (For now, the URL displayed is just text)
  • to display carriage return

I tried to use “DomSanitizer” from Angular, but no success (may be I read the docs wrong)
What must I do ?

That’s my HTML code

<div id="msgOrigine">
                <h3 style="margin: 0; padding-bottom: 0.5em">{{item.titre}}</h3>

And that’s my TS :

load() : void
      .subscribe((data : any) =>
         this.itemsBDD = data;
      (error : any) =>


Thank you for your help :slight_smile:

Somebody will probably come in and recommend innerHTML. I would instead suggest pretending that doesn’t exist, and looking at a solution along the lines of this instead.