Incorporação de JavaScript não adiciona barra de diretório ao importar caminhos de imagens, quebrando as imagens

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)

Bem, faz um tempo, mas sim.

O código acima parece normalizar URLs de imagens que começam com / (corrigindo o nome do host), mas não aquelas relativas à URL atual.

Talvez isso devesse ser assim em vez disso?

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

Se eu estiver certo, acho que o código algumas linhas acima tem o mesmo erro.

2 curtidas