RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.59k stars 235 forks source link

Odd issue with links #443

Closed mvelosop closed 6 years ago

mvelosop commented 6 years ago

This is not rendered as it should in version 1.12.17 (nor 16 either)

in [GitHub](https://github.com/mvelosop) <br/> 
on [GitHub](https://github.com/mvelosop) <br/>
in [Microsoft](http://microsoft.com) <br/>
on [Microsoft](http://microsoft.com)

image

RickStrahl commented 6 years ago

Whoa that's one heck of a strange bug...

It looks like on before or after a URLis causing this problem which seems very odd. Changing on to anything else seem to work.

RickStrahl commented 6 years ago

Ok after some experimenting this is actually due to a bug in the HtmlSanitation code that's been recently added.

If you go to Tools->AllowScriptInMarkdown and turn that on the failure goes away.

Looks like a parsing error with an overeager RegEx expression that's reading too far forward.

RickStrahl commented 6 years ago

This is the issue in Westwind.Utilities:

https://github.com/RickStrahl/Westwind.Utilities/commit/3e7ed797edd7e91855a56641ae35ed6d24285c20

Fixed the issue over there and will update the package reference in MM for the next update.

Thanks for the report!

mvelosop commented 6 years ago

Great @RickStrahl,

I see, looking for JS events, right?

Thanks!

RickStrahl commented 6 years ago

Yup. Verified with the updated library:

image

as well as a couple of additional scenarios.

I've pushed up an update to the preview release.

FWIW - you can use two spaces for line breaks at the end of a line.

mvelosop commented 6 years ago

Thanks!

I know about the two spaces, this is for a customer that prefers not to use them! 🙂