Links in comments get mangled when requesting an edit by a moderator.

Avatar
  • updated
  • Under review

Hi Daniel,


This is a bit involved, so bear with me. I have to give a little background info here first. The "edit comment" feature where I can fix my own typos within 15 minutes after submitting a comment is fantastic. I am prone to typos so I use this thing all the time. 


The "edit comment" feature does a great job even with comments containing links. As you are aware, hyperlinks in comments are turned into tiny URLs when the comment is submitted. The "edit comment" feature undoes the tiny URL and restores the full link when editing a comment. The link is then turned back into a tiny URL when the fixed comment is resubmitted. This allows me to fix words, sentences or entire paragraphs during the 15 minute grace period. Links are never mangled because tiny URLs are undone and redone seamlessly by "edit comment".


Unfortunately everything changes after the 15 minute grace period. At that point I must request a moderated edit to fix a typo. I understand the reason for requiring a moderator and have no issue with that. But there seems to be a problem with comments containing links. When I request a moderated edit for a comment containing a link, that link inevitably gets mangled. Most of time I simply want to fix a word or sentence and don't want any change to occur with the link. When I submit the edit request, the moderator faithfully fixes the word or sentence but all links are broken in the process. 


I'm not sure why this happens. Perhaps the editing tools used by moderators are not as versatile as the "edit comment" feature available during the 15 minute grace period. Maybe the tiny URLs are not properly undone prior to editing and properly turned back into tiny URLs afterwards. Maybe the links remain tiny URLs during the edit and then get hashed again into bogus tiny URLs. Maybe there is a character set incompatibility across disparate systems that screws up the rehashing of links. Don't really know for sure about the details, but the bottom line is those links get totally hosed by the moderated edit.


Submitting a plea of caution along with fully expanded references of all URLs will sometimes yield good results. But expanding the URLs and noting their placement in the comment is laborious and unrelated to the actual edit request. Most of the time only a word or a sentence requires correction and the links just need to be preserved. 


The additional complexity of specifying expanded URLs and their placement within the comment is unsatisfactory. Many times the request for caution goes unheeded. Words and sentences are properly edited but the links get broken anyways. Other times the links are preserved but the formatting gets messed up. I'm a bit of a stickler for details. Paragraphs should be properly delineated and each link should occupy a separate line. My use of linefeed is deliberate and not random. I also like double dashes and a space to precede links. Often times a short phrase in parenthesis immediately follows a link on the same line to describe it. Clarity of presentation goes hand in hand with clarity of thought.


All this stuff goes out the window if I request an edit of any comment containing a link. For a concrete example consider the comment linked below.


-- https://seekingalpha.com/article/4105564-massive-capital-needs-cause-fuelcell-energys-turn-toxic-financing#comment-76369037 (This comment has a typo)


This comment was submitted a few days ago by me. I discovered a typo after the 15 minute grace period and have been weighing the risks of having it fixed by a moderator. The typo is minor except for the fact the comment contains two links. The links are preceded by double dashes and space, followed by descriptions in parenthesis, and occupy deliberately chosen positions between paragraphs. In short, this is a moderated edit request minefield just waiting to get screwed up.


All I want done to this comment is have the word "buys" replaced by the word "picks". The edit is technically trivial but contextually important. Cummins picked Ceres for a partnership, they didn't buy Ceres. My phrase next to the link needs fixing. Everything else in the comment is fine and should remain unchanged.


I was about ready to write off this regrettable typo. But then I thought about the great job you did fixing a problem I reported on September 19th. Maybe you can help me again.


At a minimum, please fix my comment typo as requested. More generally, it would be great if you could find out why links get broken by moderated edits and fix that problem. Moderators should be able to fix typos as effortlessly and flawlessly as I can via "edit comment". That seems like a reasonable capability for moderators.


Appreciate your consideration in this matter. Let me know. Thanks.
Avatar
stocks for profit
Quote from anonymous

Hi All,


Can you please direct me to a comment where this happened so we can check?


Are you able to reproduce the issue?

Hi Daniel,


I've had to edit this note here in an attempt to convey the conversion errors. Posting seems to gobble them up and obscure the behavior. I've replaced semicolons with colons and spaces in an attempt to suppress conversion. Links also have spaces interspersed to suppress conversion.


Now on to the original note:


Recently did a comment here...


https://seekingalpha.com/article/4131713-fuelcell-arrives-port-long-beach#comment-77229150


First time posting always works. Edits during the 15 minute grace period are now problematic. Anomalous behavior is visible when a posted comment is pulled into the edit box by clicking on "Edit Comment". My comment was successfully edited because I was aware of the problems and worked around them. Trusty "Edit Comment" no longer works as well as it used to. Making corrections during the 15 minute grace period caused various issues with the & (ampersand) character and > (right angle bracket).  Links were also embellished with markup language.


Taking specific examples from my recent comment:


An & (ampersand) originally posted will appear normal. Clicking "Edit Comment" converts the ampersand into & amp : in the edit box. Neglecting to delete the anomalous ampersand text will result in & amp : getting posted back after the edit session. Uncorrected repeated edits will cause the error to propagate recursively. So & becomes & amp : which becomes & amp : amp : and so on.


I noticed similar behavior with > (right angle bracket). The recursive conversion process goes as follows: The > becomes & gt : which becomes  & amp : gt :  and then & amp : amp : gt : and so on. Getting the picture?


There are probably other characters with problematic behavior but I have not sought them out.


Links also manifest themselves differently and now appear to contain markup language. These changes are potentially problematic.


My comment mentioned above has several links. All of them exhibited the same behavior described below. The original long form posted link was successfully converted into a short URL: http://bit.ly/2ErF8eH when first posted. But clicking "Edit Comment" converted the link into < a

rel="nofollow" target="_blank" href="http: // bit.ly / 2ErF8eH" > http: // bit.ly / 2ErF8eH < / a >


At first I felt compelled to delete the extraneous link text, but surprisingly after some experimentation all that stuff posted successfully. I suspect certain links containing problematic characters like ampersand might be gumming up the works. That could explain why links sometimes cause difficultly. Don't really know for sure.


Hope this helps. Maybe others will add some color.



Avatar
stocks for profit
Quote from stocks for profit

Hi Daniel,


I've had to edit this note here in an attempt to convey the conversion errors. Posting seems to gobble them up and obscure the behavior. I've replaced semicolons with colons and spaces in an attempt to suppress conversion. Links also have spaces interspersed to suppress conversion.


Now on to the original note:


Recently did a comment here...


https://seekingalpha.com/article/4131713-fuelcell-arrives-port-long-beach#comment-77229150


First time posting always works. Edits during the 15 minute grace period are now problematic. Anomalous behavior is visible when a posted comment is pulled into the edit box by clicking on "Edit Comment". My comment was successfully edited because I was aware of the problems and worked around them. Trusty "Edit Comment" no longer works as well as it used to. Making corrections during the 15 minute grace period caused various issues with the & (ampersand) character and > (right angle bracket).  Links were also embellished with markup language.


Taking specific examples from my recent comment:


An & (ampersand) originally posted will appear normal. Clicking "Edit Comment" converts the ampersand into & amp : in the edit box. Neglecting to delete the anomalous ampersand text will result in & amp : getting posted back after the edit session. Uncorrected repeated edits will cause the error to propagate recursively. So & becomes & amp : which becomes & amp : amp : and so on.


I noticed similar behavior with > (right angle bracket). The recursive conversion process goes as follows: The > becomes & gt : which becomes  & amp : gt :  and then & amp : amp : gt : and so on. Getting the picture?


There are probably other characters with problematic behavior but I have not sought them out.


Links also manifest themselves differently and now appear to contain markup language. These changes are potentially problematic.


My comment mentioned above has several links. All of them exhibited the same behavior described below. The original long form posted link was successfully converted into a short URL: http://bit.ly/2ErF8eH when first posted. But clicking "Edit Comment" converted the link into < a

rel="nofollow" target="_blank" href="http: // bit.ly / 2ErF8eH" > http: // bit.ly / 2ErF8eH < / a >


At first I felt compelled to delete the extraneous link text, but surprisingly after some experimentation all that stuff posted successfully. I suspect certain links containing problematic characters like ampersand might be gumming up the works. That could explain why links sometimes cause difficultly. Don't really know for sure.


Hope this helps. Maybe others will add some color.



I believe this behavior is reproducible. Though it might vary depending on whether you are doing stuff internally as an SA tech or from outside via the Web like us ordinary folks. 


Create a standard user account via the web and give it a try.


P.S. - The specific short URL example given for link behavior actually comes from another of my comments immediately preceding the one mentioned in my note. It only had one link and was easier to experiment with. The link to that comment is here:


https://seekingalpha.com/article/4131713-fuelcell-arrives-port-long-beach#comment-77229139


Avatar
anonymous

We have identified the issue and will  fix ASAP. Thanks so much for the detailed report.

Avatar
stocks for profit
Quote from anonymous

We have identified the issue and will  fix ASAP. Thanks so much for the detailed report.

Hi Daniel,


Appreciate your efforts.


As noted previously, I couldn't find fault with link handling in my example from yesterday but still suspected that a problem exists. Well here's an example of a link which does get screwed up by "Edit Comment".


All links conforming to the general format shown below work fine when first posted, but get broken after clicking "Edit Comment". It should be noted that links of this type are converted to a slightly longer home-brewed short URL when posted in comments. That makes links like these untypical, as most links are converted to standard short URL form. Spaces have been added to prevent link formation here.


https : // seekingalpha . com / article / 1234567-name-of-the-article # comment-12345678


The link above resolves into a home-brewed short URL. Most other links resolve into standard short URLs. The general form of these links are shown below. The a's on the right denote alphanumeric characters. The standard short URL is 14 characters long after omitting my spaces. The home-brewed short URL is longer.


Home-brewed short URL: seekingalpha . com / c / aaaaaa

Standard short URL: bit . ly / aaaaaaa


The error seems to truncate the longer home-brewed short URL after "Edit Comment" is clicked. Truncation occurs beyond the 14th character position. Only "seekingalpha.c" remains. This is visible in the edit box among the markup language associated with the URL. Considering that most links are standard short form, this truncation is the cause of broken links. If so then any links not turned into standard short URLs could be vulnerable to this kind of error. Exception handling needs to be added to accommodate the various flavors of links. While I can't give a specific example offhand, I remember seeing other kinds of links which are not converted to standard short URLs.


Maybe the link error reported by @Ledlights a few days ago was of a similar nature.


It is interesting that links are no longer expanded back into their original long form by "Edit Comment". I miss that feature. None of this used to be an issue. "Edit Comment" was working perfect until recently. After the current bugs with "Edit Comment" have been dealt with, I would still like my original request to be fulfilled. 


Moderated edits for comments containing links remain a problem. 


Thanks.


Avatar
stocks for profit
Quote from stocks for profit

Hi Daniel,


Appreciate your efforts.


As noted previously, I couldn't find fault with link handling in my example from yesterday but still suspected that a problem exists. Well here's an example of a link which does get screwed up by "Edit Comment".


All links conforming to the general format shown below work fine when first posted, but get broken after clicking "Edit Comment". It should be noted that links of this type are converted to a slightly longer home-brewed short URL when posted in comments. That makes links like these untypical, as most links are converted to standard short URL form. Spaces have been added to prevent link formation here.


https : // seekingalpha . com / article / 1234567-name-of-the-article # comment-12345678


The link above resolves into a home-brewed short URL. Most other links resolve into standard short URLs. The general form of these links are shown below. The a's on the right denote alphanumeric characters. The standard short URL is 14 characters long after omitting my spaces. The home-brewed short URL is longer.


Home-brewed short URL: seekingalpha . com / c / aaaaaa

Standard short URL: bit . ly / aaaaaaa


The error seems to truncate the longer home-brewed short URL after "Edit Comment" is clicked. Truncation occurs beyond the 14th character position. Only "seekingalpha.c" remains. This is visible in the edit box among the markup language associated with the URL. Considering that most links are standard short form, this truncation is the cause of broken links. If so then any links not turned into standard short URLs could be vulnerable to this kind of error. Exception handling needs to be added to accommodate the various flavors of links. While I can't give a specific example offhand, I remember seeing other kinds of links which are not converted to standard short URLs.


Maybe the link error reported by @Ledlights a few days ago was of a similar nature.


It is interesting that links are no longer expanded back into their original long form by "Edit Comment". I miss that feature. None of this used to be an issue. "Edit Comment" was working perfect until recently. After the current bugs with "Edit Comment" have been dealt with, I would still like my original request to be fulfilled. 


Moderated edits for comments containing links remain a problem. 


Thanks.


"I remember seeing other kinds of links..."


Quickly scanning the past 6 months of my comments reveals this list of short URL variants. The ones below are only a small sample of what clearly must be a huge variety of short URLs. The exception handling I mention in my previous note must be general enough to cope with this.


seekingalpha . com / c / aaaaaa
bit . ly / aaaaaaa
tinyurl . com / aaaaaaaa
lat . ms / aaaaaaa
reut . rs / aaaaaaa
on . app . com / aaaaaaa
read . bi / aaaaaaa
for . tn / aaaaaaa
cnb . cx / aaaaaaa
delonline . us / aaaaaaa
on . ny . gov / aaaaaaa


Anything longer than 14 characters is probably getting screwed up by "Edit Comment" right now. Well, I'm not going to tell grandma how to knit. I just want a nice fitting sweater. All the best to you.


Avatar
anonymous

This issue should now be fixed. Please let us know.


Thanks!

Avatar
stocks for profit
Quote from stocks for profit

"I remember seeing other kinds of links..."


Quickly scanning the past 6 months of my comments reveals this list of short URL variants. The ones below are only a small sample of what clearly must be a huge variety of short URLs. The exception handling I mention in my previous note must be general enough to cope with this.


seekingalpha . com / c / aaaaaa
bit . ly / aaaaaaa
tinyurl . com / aaaaaaaa
lat . ms / aaaaaaa
reut . rs / aaaaaaa
on . app . com / aaaaaaa
read . bi / aaaaaaa
for . tn / aaaaaaa
cnb . cx / aaaaaaa
delonline . us / aaaaaaa
on . ny . gov / aaaaaaa


Anything longer than 14 characters is probably getting screwed up by "Edit Comment" right now. Well, I'm not going to tell grandma how to knit. I just want a nice fitting sweater. All the best to you.


There's no substitute for testing. 


Here are 10 long URLs taken from actual comments I've made over the last 6 months. They generated 10 short URLs which are the variants I describe in my previous note. I tried to include an example from the past which convert into a tinyurl . com example, but those full links seem to turn always into bit . ly short URLs now.


These 10 long URLs shown below become short URLs when posted in a comment. Each one generates a different variant of short URL. 


SA comment
-- https://seekingalpha.com/article/4131713-fuelcell-arrives-port-long-beach#comment-77229139

bit . ly
-- https://www.utilitydive.com/news/new-york-expected-to-set-high-bar-for-energy-storage-after-target-bill-pass/445845/

lat . ms
-- http://www.latimes.com/me-2003-los-angeles-streetcar-history-story.html

reut . rs
-- https://www.reuters.com/article/us-singapore-exxon-plant/exxonmobil-opens-third-cogeneration-power-plant-in-singapore-idUSKBN1CH07O

on . app . com
-- http://www.app.com/story/money/business/main-street/2017/09/08/vonage-ceo-fake-news/634939001/

read . bi
-- http://markets.businessinsider.com/news/stocks/FuelCell-Energy-Announces-20-Megawatt-Fuel-Cell-Project-with-Korea-Southern-Power-CompanyRepresents-first-fuel-cell-project-for-Korea-Southern-Power-Company-KOSPO-1002313440

for . tn
-- http://fortune.com/2016/10/06/bloom-energy-ipo/

cnb . cx
-- https://www.cnbc.com/2017/05/16/bloom-energy-2017-disruptor-50.html

delonline . us
-- http://www.delawareonline.com/story/news/local/2015/07/22/new-bloom-box/30475483/

on . ny . gov
-- https://www.nyserda.ny.gov/All-Programs/Programs/Clean-Energy-Standard/Renewable-Generators-and-Developers


The 10 long URLs become the following short URLs when posted in a comment. All links work when posted for the first time, but two of them display in abbreviated form followed by ellipsis. The actual short URLs for the two abbreviated links only show in the status bar of my browser when I float my mouse over the link.


SA comment

-- https://seekingalpha.com/c/19zadv (actual short URL)

-- https://seekingalpha.c... (but URL is displayed like this in the comment)

bit . ly

-- http://bit.ly/2ELc6GT

lat . ms
-- http://lat.ms/2xOGQGp

reut . rs
-- http://reut.rs/2BshInK

on . app . com
-- http://on.app.com/2y1j2vZ

read . bi
-- http://read.bi/2xhXwpZ

for . tn
-- http://for.tn/2vvYAkI

cnb . cx
-- http://cnb.cx/2w542OV

delonline . us
-- http://delonline.us/2ecQSbo (actual short URL)

-- http://delonline.us/2e... (but URL is displayed like this in the comment)

on . ny . gov
-- http://on.ny.gov/2vnRK0u


When clicking on "Edit Comment", all links are pulled into the edit box with their associated markup language as described in one of my earlier notes. The markup language shows each short URL twice, once with the href tag and again at the end for the display value. The href and display are the same for all links except the two with ellipsis. Those two have the actual short URL only in the href tag and show the abbreviated URL with ellipsis at the end of the markup.


Example of a non-abbreviated short URL with spaces added to suppress conversion:


< a rel="nofollow" target="_blank" href="http : // read . bi / 2xhXwpZ" >http : // read . bi / 2xhXwpZ 

< / a  >


Example of an abbreviated short URL with spaces added to suppress conversion:


< a rel="nofollow" target="_blank" href="http : // delonline . us / 2ecQSbo" > http : // delonline . us / 2e...

< / a >


So far so good. The href tag values for all links are fine, which is the actual definition for the hyperlink. The display values for the two abbreviated links should not be a problem either. But ending the edit and posting back reveals the problem. The two abbreviated links are now broken. All the other links are fine. Clicking "Edit Comment" again pulls the links back into the edit box. 


Inspecting the markup language of one of the broken links reveals the following:


< a rel="nofollow" target="_blank" href="http : // delonline . us / 2e" > http : // delonline . us / 2e< / a >...


The link display value has become the definition for the hyperlink in the href tag. The ellipsis is no longer part of the markup text and now appears outside the delimiters. Clearly the abbreviated short URLs are mishandled by "Edit Comment". That is the problem.

 

It should be noted that while I couldn't seem to render a short URL for tinyurl .com in my test here, that may have been a blessing. Looking at my old comments, I see that tinyurl is also displayed in abbreviated form and would have probably been broken too.


Hope this additional information helps.

Avatar
stocks for profit
Quote from anonymous

This issue should now be fixed. Please let us know.


Thanks!

It's still broken. I'm creating test comments at the link below...


https://seekingalpha.com/filing/3803278#comment-77204377


Ampersand and right angle bracket are still a problem. Links are also problematic. Look at my new notes above about links. Forgive the evolutionary development of ideas. It was all stream of consciousness. Start at the beginning and read through it. 


As a side note, I liked the old behavior where the original long form URL was restored by "Edit Comment". I'm not sure the new "Edit Comment" behavior for links is desirable even if you can fix it. Showing HTML markup language is a little technical. Consider that the target audience are investors and most of them are not HTML savvy. The only benefit I see is the ability to hide the actual hyperlink behind a more friendly description. But clearly that doesn't work right now and is actually causing the problem.


From the larger perspective of my original request for fixing moderated edits, we seem to be stepping backwards. Unless of course you think the bug we're trying to fix now is somehow related to the problem with moderated edits. Hopefully one step back will be followed by two steps forward. 


What is causing these recent anomalies with "Edit Comment"?  Let me know.

Avatar
stocks for profit

Daniel, did you miss this? An excerpt from a long note I made yesterday here...


When clicking on "Edit Comment", all links are pulled into the edit box with their associated markup language as described in one of my earlier notes. The markup language shows each short URL twice, once with the href tag and again at the end for the display value. The href and display are the same for all links except the two with ellipsis. Those two have the actual short URL only in the href tag and show the abbreviated URL with ellipsis at the end of the markup.


Example of a non-abbreviated short URL with spaces added to suppress conversion:

< a rel="nofollow" target="_blank" href="http : // read . bi / 2xhXwpZ" >http : // read . bi / 2xhXwpZ 

< / a  >


Example of an abbreviated short URL with spaces added to suppress conversion:

< a rel="nofollow" target="_blank" href="http : // delonline . us / 2ecQSbo" > http : // delonline . us / 2e...

< / a >


So far so good. The href tag values for all links are fine, which is the actual definition for the hyperlink. The display values for the two abbreviated links should not be a problem either. But ending the edit and posting back reveals the problem. The two abbreviated links are now broken. All the other links are fine. Clicking "Edit Comment" again pulls the links back into the edit box.

 

Inspecting the markup language of one of the broken links reveals the following:

< a rel="nofollow" target="_blank" href="http : // delonline . us / 2e" > http : // delonline . us / 2e< / a >...


The link display value has become the definition for the hyperlink in the href tag. The ellipsis is no longer part of the markup text and now appears outside the delimiters. Clearly the abbreviated short URLs are mishandled by "Edit Comment". 


That is the problem.

Avatar
stocks for profit

Daniel, here's a concise version...


"Edit Comment" mishandles hyperlink aliases. The alias clobbers the href value on update.


 < a href="URL location" > Alias < / a >


That's OK if alias defaults to the actual short URL. But a real alias, like an abbreviated URL with ellipsis, causes a problem.