瀏覽代碼

URL encode google map block (#173)

Fixes issued #162
Hayley Hartman 6 年之前
父節點
當前提交
95c048fcac
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      coderedcms/templates/coderedcms/blocks/google_map.html

+ 1 - 1
coderedcms/templates/coderedcms/blocks/google_map.html

@@ -3,6 +3,6 @@
 	{% if self.place_id %}
 		<iframe class="embed-responsive-item" width="100%" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=place_id:{{ self.place_id }}&zoom={{ self.map_zoom_level }}&key={{ settings.GoogleApiSettings.google_maps_api_key}}" allowfullscreen></iframe>
 	{% else %}
-		<iframe class="embed-responsive-item" width="100%" style="border:0" src="https://maps.google.com/maps?q={{ self.search }}&output=embed" allowfullscreen></iframe>
+		<iframe class="embed-responsive-item" width="100%" style="border:0" src="https://maps.google.com/maps?q={{ self.search|urlencode }}&output=embed" allowfullscreen></iframe>
 	{% endif %}
 </div>