You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Dirk Frederickx (JIRA)" <ji...@apache.org> on 2010/12/02 20:22:10 UTC
[jira] Commented: (JSPWIKI-675) quickEdit couldn't work when input
Chinese
[ https://issues.apache.org/jira/browse/JSPWIKI-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12966240#action_12966240 ]
Dirk Frederickx commented on JSPWIKI-675:
-----------------------------------------
The regex is indeed not ok to support other languages. Best is to extend the regex A-Za-z to cover include all Uni-code letters.
The regex should be modified like this:
/[^0-9A-Za-z\u00C0-\u1FFF\u2800-\uFFFD()&+,-=._$ ]/g
> quickEdit couldn't work when input Chinese
> ------------------------------------------
>
> Key: JSPWIKI-675
> URL: https://issues.apache.org/jira/browse/JSPWIKI-675
> Project: JSPWiki
> Issue Type: Wish
> Components: Localization
> Affects Versions: 2.8.4
> Environment: ubuntu10.04, jdk6r2, jspwiki2.8.4
> Reporter: Tony Lin
> Assignee: Dirk Frederickx
>
> When I input some Chinese, and click "quickEdit", it turns to an error page with the url as "http://localhost:8080/wiki/Login?redirect=". No parameters.
> I checked the flie named jspwiki-common.js, found that the function cleanLink() couldn't recognize the Chinese with the regex.
> When I modify the regex from "^A-Za-z0-9()&+,-=._$" to "^A-Za-z0-9\u4e00-\u9fa5()&+,-=._$", It works.
> I think that this method may work with other languages.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.