thephpleague / html-to-markdown

Convert HTML to Markdown with PHP
MIT License
1.77k stars 205 forks source link

Non-autolinks should get escaped #68

Closed marijnvdwerf closed 5 years ago

marijnvdwerf commented 8 years ago

Input:

<p>&lt;league/commonmark&gt;, &lt;github.com/thephpleague&gt;, &lt;league@commonmark&gt;, &lt;https://github.com/thephpleague&gt;</p>

Actual:

<league/commonmark>, <github.com/thephpleague>,
 <league@commonmark>, <https://github.com/thephpleague>

Expected:

<league/commonmark>, <github.com/thephpleague>,
 \<league@commonmark>, \<https://github.com/thephpleague>
colinodell commented 8 years ago

I need to think about this one. Any feedback for/against this would be appreciated.

marijnvdwerf commented 8 years ago

I've been using this library to convert legacy forum posts to Markdown (example), but didn't want to change the final output. People wrote stuff in a certain way, and have seen it rendering like this.

It kinda depends what the goal of the project is. Identical rendered output, or a less exact approach.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.