This is a migrated thread and some comments may be shown as answers.

Import Html with link issue

1 Answer 62 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sistema PRI
Top achievements
Rank 1
Sistema PRI asked on 29 May 2017, 08:25 PM

Hi,

I have a html on my database:

Prezado(a) Délio Tomaz(), <br>
        O Documento \Measurement\Cronograma Financeiro.xlsx sob sua responsabilidade vencerá no dia 30/05/2017.
        <br>
        <br><a href='http://slocal:11100//PrixDocxDowdnloxad?Token=xxxxxx>Link Text</a><br>
   Atenciosamente,
        <br>
        Equipe PRIMANAGER

 

I am loading this Html with HtmlFormatProvider. But when the richtext loads the Html I got the issue attached (imagemtelerik.png). Note that the link tag is broken. All text was read as link and it loses it formatting.

 

If I take out the inner text from <a> tag, all works fine (the link isn't show, but my html is OK)(sem titulo.png).

The code to read the HTML:

var provider = new HtmlFormatProvider();
var document = provider.Import(html);

 

Best 

Delio

 

 

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 31 May 2017, 02:09 PM
Hi,

Thank you for providing the html snippet. Seems like you are missing the closing quote for the href attribute. Updating the code as below should work fine.
Prezado(a) Délio Tomaz(), <br>
        O Documento \Measurement\Cronograma Financeiro.xlsx sob sua responsabilidade vencerá no dia 30/05/2017.
<br>
<br><a href='http://slocal:11100//PrixDocxDowdnloxad?Token=xxxxxx'>Link Text</a><br>
   Atenciosamente,
<br>
        Equipe PRIMANAGER
Hope this helps.

Regards,
Peshito
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RichTextBox
Asked by
Sistema PRI
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or