我粘贴了这个链接:https://www.google.com/maps/d/embed?mid=za0Bx0koO4sk.kHCbG4TApEP4
在我的两个 Discourse 论坛的单行中。
它在其中一个论坛上可以正常工作,生成的代码如下:
<div class="maps-onebox">
<iframe src="https://www.google.com/maps/d/embed?mid=13xLbRXoFU-UIUoTiOwJdvLzkoUw" width="690" height="400" frameborder="0" style="border:0" seamless="seamless" sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation"></iframe>
</div>
在无法工作的论坛上,生成的代码如下:
<div class="maps-onebox">
<iframe width="690" height="400" frameborder="0" style="border:0" data-unsanitized-src="https://www.google.com/maps/d/embed?mid=za0Bx0koO4sk.kHCbG4TApEP4" seamless="seamless" sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation"></iframe>
</div>
请注意,在无法工作的论坛中,iframe 上有一个 data-unsanitized-src 属性。
两个论坛都使用了 2.6.0.beta3(b8015ab654 )。
我也可以在 try.discourse.org 上复现此问题:
https://try.discourse.org/t/try-gmap-embed-stuff/1499
请注意,生成的 iframe 也包含一个 data-unsanitized-src 属性。