and symbol gets replaced by "&" everywhere on Lemmy

Is this a known issue? If you type in https://lemmy.ml/pictrs/image/ef8ffb51-fe76-449c-89ae-5d585b244abf.png somewhere it will be replaced by https://lemmy.ml/pictrs/image/3363f387-4e3f-40c2-9141-88a6a1598387.png

Don’t get me started on how this messes up linux commands and scripts, Is this a me problem or a lemmy problem? I need to study, if this is a known problem, then fine, but if it isn’t then it needs to be reported.

jordanlund,
@jordanlund@lemmy.one avatar

& is how & is represented in HTML.

hammockforums.net/…/105012-What-does-amp-amp-mean…

If you need a literal &, then preceed it with an escape character like “\”.

Subject6051, (edited )

thank you! that’s intersting. I have had scripts ruined due to this. I thought markdown did that by default at least when code blocks are on

snaptastic,

These are programming details that the user should not have to think about.

jordanlund,
@jordanlund@lemmy.one avatar

OP noted: “Don’t get me started on how this messes up linux commands and scripts”

If you’re running linux commands and scripts, you’re not a normal user and should know this already. :) It’s only been the standard for 30 years or so.

peter,
@peter@feddit.uk avatar

“standard” is that the character you input stays as the same character and isn’t transformed. The fact that it’s being shown as & means that either OP is using a client which isn’t correctly decoding html, or its being double sanitised as &. Neither tog those is “standard”, it’s a bug.

jordanlund,
@jordanlund@lemmy.one avatar

Not in HTML. Never has worked that way.

Special reserved characters have always been handled this way because you don’t want to accidentally interpret something the wrong way.

Same for URL encoding. You upload “Clever Name.PDF” to a website and it generates a URL of “Clever%20Name.PDF” because spaces aren’t valid in URLs. %20 is the code for a space.

peter,
@peter@feddit.uk avatar

But when you see it on your screen it’s supposed to be converted back into the actual character, otherwise it would be pointless. So if you’re seeing & then the website is messing up.

EuphoricPenguin22,
@EuphoricPenguin22@normalcity.life avatar

should know this already. :)

What in the gosh darn condescending non sequitur is that? I have a special kind of dislike for people who, instead of trying to promote learning for anyone and everyone at any stage, instead choose to ridicule people for having missed some trivial detail that has about as much in common with Bash as does COBOL (basically nothing). Web scripting is, unsurprisingly, its own skill, and it’s very, surpassingly, extremely, stupendously, and obviously conceivable that someone could have years of Bash experience but only recently started putting around with scripting for things like API access or HTML parsing. But you should know this already. :)

jordanlund,
@jordanlund@lemmy.one avatar

Text encoding is SUPER basic and anyone looking to get involved in Linux or scripting absolutely should know that stuff FIRST.

Source: I was teaching Linux 23 years ago before it was cool.

Here’s a good primer:

ASCII:
techtarget.com/…/ASCII-American-Standard-Code-for…

URL encoding:
www.w3schools.com/tags/ref_urlencode.ASP

Entity encoding:
www.w3schools.com/html/html_entities.asp

Really, ALL of the W3Schools stuff is just fantastic. Anyone remotely interested in this stuff should start at the beginning there and work up.

Subject6051,

I don’t know why, this happens sometimes and doesn’t happen other times. I don’t know the cause of it.

& & & this didn’t happen now

raoulraoul,
@raoulraoul@lemmy.world avatar

It happens in post titles in lemmy desktop. lemmy apps vary on correct rendering of certain glyphs/entities. Even bold and italic markdown is rendered literally, that is, incorrectly.

In any case, it’s still a bug.

Subject6051,

is it a reported bug though?

Subject6051,

@dessalines is this bug reported?

HKayn,
@HKayn@dormi.zone avatar

You can check the issues page on the lemmy-ui repo yourself to see if this has already been reported.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines