L'inserimento di JavaScript non aggiunge la barra alla directory nei percorsi di importazione delle immagini, causando la rottura delle immagini

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)

Beh, è passato un po’ di tempo, ma sì.

Il codice sopra sembra normalizzare gli URL delle immagini che iniziano con / (correggendo il nome host), ma non quelli relativi all’URL corrente.

Forse dovrebbe essere invece questo?

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

Se ho ragione, penso che il codice poche righe sopra abbia lo stesso bug.

2 Mi Piace