• View name with "\" is not rendered

    By Devendran C.M. 2 decades ago

    Hi Jason,

    Your NotesView2 is splendid and overall will be great to the developers to web enable the bunch of databases with out any hassle.

    I have a view named "sample\sample" in that case script is not able to understand the "\" and not able render the view on the browser.

    If i give an alias name to the view and change the @subset formula in the header, then it works. but my problem is i have plenty of databases(100+) without alias and changing them to alias is not practically possible.

    Is there is a quick solution to fix the issue.



    Thanks

    Devendran

    • howTo: views with \ in the name

      By jason a thomas 2 decades ago

      In the HTML Head Content please replace the following line:

      "var VIEW_NAME = '" + @ReplaceSubstring(@Subset(@ViewTitle;1);"'";"\'") + "';"+

      with this line:

      "var VIEW_NAME = '" + @ReplaceSubstring(@Subset(@ViewTitle;1);"'": "\";"\'":"\\") + "';"+

      This should properly escape any backslash characters within the javascript.



      The VIEW_NAME javascript variable could be set anywhere in your code and the formula language that I provide in the $$ViewTemplateDefault is really provided only as a sample way to do it. For this reason, I am removing this as a bug.

      • Thanks

        By Devendran C.M. 2 decades ago

        Thanks, It works!!