[
https://issues.apache.org/jira/browse/JSPWIKI-1318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143128#comment-18143128
]
ASF subversion and git services commented on JSPWIKI-1318:
----------------------------------------------------------
Commit a88104049e8ee3e152d4e3fa937fcbe0375cfd3d in jspwiki's branch
refs/heads/bug/JSPWIKI.1296 from spyhunter99
[ https://gitbox.apache.org/repos/asf?p=jspwiki.git;h=a88104049 ]
Merge pull request #564 from arturobernalg/bug/JSPWIKI-1318
JSPWIKI-1318 Keep the plus sign of a value when the cookies are read
> User preferences lose a plus sign: a time zone such as GMT+5 is not saved
> -------------------------------------------------------------------------
>
> Key: JSPWIKI-1318
> URL: https://issues.apache.org/jira/browse/JSPWIKI-1318
> Project: JSPWiki
> Issue Type: Bug
> Reporter: Arturo Bernal
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.0.1
>
>
> A time zone with a plus sign cannot be saved in the user preferences.
> Steps: open UserPreferences.jsp, choose the time zone GMT+5 (the list has 16
> zones with a plus sign, all of them to the east of Greenwich), save, and open
> the page again.
> Expected: the time zone is still GMT+5.
> Actual: the selector shows the first option of the list, GMT-12. The cookie
> JSPWikiUserPrefs holds GMT 5, with a blank where the plus sign was. A zone
> with a minus sign, such as GMT-5, is kept.
> Cause: the function that reads cookies, in
> jspwiki-war/src/main/scripts/util/cookies.js, decodes the value and then
> replaces every plus sign with a blank. The value is written with
> encodeURIComponent, which writes a plus sign as %2B, so the plus sign is lost
> when the preferences are read, and the next save stores the blank.
> Found with the current master (3.0.1-SNAPSHOT, Tomcat 10.1, Chrome). Related
> to JSPWIKI-1049, where a time zone was one of the preferences that were not
> kept; the case of that report, GMT-5, is not affected by this. A pull request
> is open: https://github.com/apache/jspwiki/pull/564.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)