Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16219

Function xwiki.js:prepareName contains some unnecessary code

    Details

    • Difficulty:
      Trivial
    • Documentation:
      N/A
    • Documentation in Release Notes:
      Minor unnoticeable change
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      The JavaScript function "prepareName" in "xwiki.js" contains the code below:

      fname.replace(/ /g,"");
      [...]
      lname.replace(/ /g,""); 
      [...]
      cxwikiname.value = noaccent(fname + lname)
      

      The XWiki function "noaccent" actually already remove space characters in its current implementation, hence no additional replacement is needed (and the values returned by the calls to "replace" are actually not updating any variable in any case).

        Attachments

          Activity

            People

            • Assignee:
              karannaoh Karan Pratap Singh
              Reporter:
              slauriere slauriere
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: