Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1295

Usage of $mathtool.toDouble() is dangerous

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 6.2
    • Velocity
    • None
    • Unknown
    • N/A
    • N/A

    Description

      $mathtool.toDouble("2.1")
      

      returns "2.1" when the English locale is set, but "2" when the French locale is used.

      Sometimes it could be nice to have this conversion in the locale of the server, but sometimes the developer did not expect it and it creates a bug (see XWIKI-11343).

      This function is locale dependent, and we have no way yo manually set the locale.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              gdelhumeau Guillaume Delhumeau
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: