Skip to main content
Topic: Using Markdown in Email (Read 911 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Using Markdown in Email

Hello,

It's a high-performance forum app and it's open-source, which is great. Thanks for this.
I just registered and an activation e-mail was sent to my e-mail box, but it was difficult to read the content and impossible to click on the link.
I think Markdown was used, but because there is no Markdown detector in the e-mail software, such an image appears.

Thank you.


Re: Using Markdown in Email

Reply #1

Hi and welcome to Elkarte!
Thanks for the report, it was already reported here https://github.com/elkarte/Elkarte/issues/3536
sorry for my bad english

Re: Using Markdown in Email

Reply #2

Yes it is sent in markdown, but thats not in error.   The links are broken (a reported bug), this seems to be because of word wrapping being done as its breaking the strings at what it perceives is a punctuation mark.  Its on my list to correct, as best as possible, in 1.1.9
Be safe, Be kind, Happy Programing

Re: Using Markdown in Email

Reply #3

I have a fix that I'm testing on another site, once I know it does not cause other issues I'll submit a PR to fix it for both 1.1.9 and 2.0
Be safe, Be kind, Happy Programing

Re: Using Markdown in Email

Reply #4

For anyone having this issues ( which should be everyone on 1.1.8 ), the fix is to replace your current file with this new one (unzip it and replace the existing file in sources/subs)

Re: Using Markdown in Email

Reply #5

Looks like maybe there's another issue with email links. Spuds.. (unless this varmint variant has been noted earlier)

Two subsequent messages posted by Tino. same thread. approximately the same time...  second one with a code block goofs it..
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Using Markdown in Email

Reply #6

Disclaimer: I haven't ruled out my email client as the culprit getting confused [Pegasus v4,73] ::)
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Using Markdown in Email

Reply #7

Is it just that the links are just plain text and not links ?
Be safe, Be kind, Happy Programing

Re: Using Markdown in Email

Reply #8

In Pegasus there is a hyperlinks configuration option,. several actually - one of which is the ability to turn off/on the display of clickable hyperlinks in the received email reader window. I can also choose the color of the links, and limit the max number of links to display in that color in any one display window.

Hence, I conclude Pegasus is doing the link's parsing - however, I do not have any idea what it is looking at in order to identify the start and end of a link for notation. 
I note that it also gets confused by certain punctuation in a link - see the last link in the top example. There's nothing EA can do about that except use a different expression for passed arguments. (Dave Harris is getting "long in the tooth" now and not updating Pegasus like he used to, the latest version is 4 years old. But I'm not sure this is "his problem" anyway)

What I'm noting above is that whatever is in the code block (copied below), throws it for a loop, and it starts notating the text following and ignoring the hyperlinks

{See image at the bottom...}

---
I considered the "[@Spuds](https://www.elkarte.net/community/index.php?action=profile;u=1)" as a potential culprit but links in other messages having that "@User" tag don't get hammered, so that's not a factor.

It's not a major issue once I stop pounding the linked text and getting nowhere - I can just select the actual hyperlink to open instead, but since you were chasing markdown issues I thought this might be worth floating at you for consideration (whatever it is).

Perhaps something not "properly contained" or "terminated" within the code block?

And note: I have seen this phenomenon in messages from other sources, typically digest listings of descriptive text/associated link pairs, eventually there's some character that trips up the parsing and voilla!! - parts of the following text gets highlighted as a hyperlink and the hyperlinks go unnoticed..
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //


Re: Using Markdown in Email

Reply #10

Ah - I checked the site late last summer and got nothing new since 2018, nice to see from this month's post up Dave's back at it..

Thanks for the heads up.. although I think I'll wait for 4.81, or maybe v5.0 (unless I run into 'hisshews" before then.)  From the release notes regarding html I don't *think* what he's done with 4.80 addresses the phenomenon I noted above, but I might bounce it off him to see what he says...
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Using Markdown in Email

Reply #11

Well, I sent a query to Dave, and got a reply back from Han van den Bogaerde who maintains the embedded IERenderere in the PM package and his response was "Update the ierenderer to reflect to the latest version:" along with links.

[No matter how hard I try, I learn something new every day. In general, this is a bad thing, since I was born well before when 640K of RAM was, as Gates quipped: "more than anyone will ever need". Mine is now full and anything new I learn overwrites something I used to know, sometimes critical data.  :'(  ]

Two of the items in the latest release (5 days ago, actually) are:
  • Various kinds of incomplete Urls are now properly completed and handled accordingly.
  • The reformat and word-wrap reader options make a difference now with respect to breaking long strings (like Urls, e.g.).

So I downloaded and installed it, and while I no longer have copies of the offending EA post emails I referenced I do have copies of the ones I referred to: "And note: I have seen this phenomenon in messages from other sources, typically digest listings.. .." and lo and behold.. they are now "fissed".

Next time someone posts a code block I'll check and verify that the issue is now handled "on my end".

Whether there are "incomplete URL" coding issues that still remain to be fixed on EA's side I'll leave to Spuds (et. al.) to ponder, and I'll go do something productive.. (Odd, I can't remember what that was now, but I know it was important..)..  :P


__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Using Markdown in Email

Reply #12

Spoke too soon..   :(

Looks like the XHTML coding is not rendering in html markdown as it's expected to?  (I forwarded it on to Han for his consideration as well).
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //

Re: Using Markdown in Email

Reply #13

Looks like HTML in the message body which is something we added in 2.0 ....  not sure why its not rendering for you?
Be safe, Be kind, Happy Programing

Re: Using Markdown in Email

Reply #14

Quote from: Spuds  -  Looks like HTML in the message body which is something we added in 2.0 ....  not sure why its not rendering for you?

That's why I sent it to Han for a look-see too. 
For one, the XHTML to HTML {br /} tag apparently means nothing to the renderer, in addition to whatever is goofing the link identification.. (No idea what a straight XHTML {br/} tag would do, if anything, either..)
The module is called IERenderer, as in "Internet Explorer", and I gather he's using the embedded IE code in Windows as the engine, which MSoft has committed to continue for some time into the future supposedly, but not necessarily "update" to keep current, and so maybe IE dunno nuttin bout no XHTML?
No guessin any more, I'll wait to see what Han says.. If enlightening, I'll pass it along..

In the meantime I guess I'm gonna be 'Lucky Pierre"..
__________________________________________________________________________
// Deep inside every dilemma lies a solution that involves explosives //