JavaScript-Einbettung fügt beim Importieren von Bildpfaden kein Verzeichnisslash hinzu, Bilder werden nicht angezeigt

This looks like… a simple bug?

Note the slash missing in “catmedia”.

I didn’t find a report for this bug, although this one might be related: Embedded topics don't handle "//"-images properly

Can anyone reproduce? Or is there a fix that we could implement on our side? (other than defining images with absolute URLs, which we could do moving forward but what about the articles already published)

Nun, es ist schon eine Weile her, aber ja.

Der obige Code scheint Bild-URLs zu normalisieren, die mit einem / beginnen (korrigiert den Hostnamen), aber nicht diejenigen, die relativ zur aktuellen URL sind.

Sollte das stattdessen so sein?

    if src.present? && !src.start_with?('http')

Wenn ich recht habe, denke ich, dass der Code ein paar Zeilen darüber denselben Fehler enthält.

2 „Gefällt mir“