JavaScript embedding doesn't add directory slash importing image paths, breaks images

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)

Ну, прошло уже довольно много времени, но да.

Приведённый выше код, похоже, нормализует URL изображений, начинающиеся с / (исправляя имя хоста), но не те, что относительны текущему URL.

Может быть, вместо этого должно быть так?

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

Если я прав, то, кажется, код несколькими строками выше содержит ту же ошибку.

2 лайка