Completed
Last Updated: 04 Jun 2021 13:14 by ADMIN
Release 2021.R2.SP.next

Bug report

The PDFViewer HTML helper incorrectly serializes the passed to its "File" configuration URL, when the URL has an ampersand(&) sign in it. In the output of the HTML helper, the ampersand is changed with its ASCII code - "\u0026"

  • The issue is reproducible both in the UI for ASP.NET Core and UI for ASP.NET MVC suites.

Reproduction of the problem

  1. Create an ASP.NET Core or MVC project
  2. Paste the below code in it and run it
    @(Html.Kendo().PDFViewer() .Name("pdfviewer-test") .PdfjsProcessing(pdf => pdf .File("https://myrandomcomain.com/api/MyFolder/GetPDF?reference=xxxxxxxx&param1=0&param2=100&contentType=application/pdf") ) .Height(400) )
  3. View the source of the opened page and see the generated Javascript code

Current behavior

The generated code is:
jQuery("#pdfviewer-test").kendoPDFViewer({"pdfjsProcessing":{"file":{"url":"https://myrandomcomain.com/api/MyFolder/GetPDF?reference=xxxxxxxx\u0026param1=0\u0026param2=100\u0026contentType=application/pdf"}},"height":400});

Expected/desired behavior

The expected result is
jQuery("#pdfviewer-test").kendoPDFViewer({"pdfjsProcessing":{"file":{"url":"https://myrandomcomain.com/api/MyFolder/GetPDF?reference=xxxxxxxx&param1=0&param2=100&contentType=application/pdf"}},"height":400});

Environment

  • Kendo UI version: 2020.1.219
  • jQuery version: x.y
  • Browser: [all]