2

Resolved

GetBingHtml method in Maps helper emits literal <text> tags in JavaScript; fails to load map

description

To reproduce this issue, follow these steps:
  1. In a Razor web site, install the latest ASP.NET Web Helpers Library version using NuGet.
  2. On a CSHTML page that references JQuery, add the following. (Replace the API key below with your own.)
@Maps.GetBingHtml("Av2RVhcYgg4FaKlj1uvfJIwfLtTkKXjcxhDEIptrMWKGV55chQSrjmEmrhh2dF1K", "Seattle")
  1. Request the page in the browser of your choice.
Result: The map fails to load. Examining the page source reveals that literal <text> tags are emitted in the helper's inline JavaScript.
Expected: We should be emitting valid JavaScript.

comments

yishaigalatzer wrote Apr 24 at 5:48 PM

Fix is it's a simple fix, otherwise deprecate/remove

kenegozi wrote Apr 26 at 6:39 PM

suggested fix in in code review