Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-1052

SearchManager missing character encoding in before json response writing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.10.2
    • None
    • Search
    • linux

    Description

      When using ajax functionality in editor to create a link to pages, SearchManager will not send responses encoded in accordance to the wikiEngine.getContentEncoding.

      Proposed fix:

      
      

      ...
      String encoding = getEncoding(req);
      if (encoding != null)

      { resp.setCharacterEncoding(encoding); }

      else

      { resp.setCharacterEncoding("UTF-8"); }

      log.debug("result="+result);
      resp.getWriter().write(result);
      }

      private String getEncoding(HttpServletRequest req)

      { String ret = null; WikiEngine wikiEngine = WikiEngine.getInstance(req.getSession().getServletContext(), null); ret = wikiEngine.getContentEncoding(); return ret; } {/code}

      Attachments

        Issue Links

          Activity

            People

              metskem Harry Metske
              vpeter Varga P├ęter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: