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

SearchManager missing character encoding in before json response writing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.10.2
    • Fix Version/s: None
    • Component/s: Search
    • Labels:
    • Environment:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: