You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2025/07/24 16:33:00 UTC

[jira] [Comment Edited] (JCR-5152) Add method isValidJcrLocalName(String) to o.a.j.util.Text

    [ https://issues.apache.org/jira/browse/JCR-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009639#comment-18009639 ] 

Julian Reschke edited comment on JCR-5152 at 7/24/25 4:32 PM:
--------------------------------------------------------------

trunk: (2.23.2-beta) [e512a3a65|https://github.com/apache/jackrabbit/commit/e512a3a65f01dbb2c9b55078085871e6d0fd9ccd]
2.22: [0b8185024|https://github.com/apache/jackrabbit/commit/0b818502436cb8f8f3b76aabe2367b69f813d227]



was (Author: reschke):
trunk: (2.23.2-beta) [e512a3a65|https://github.com/apache/jackrabbit/commit/e512a3a65f01dbb2c9b55078085871e6d0fd9ccd]

> Add method isValidJcrLocalName(String) to o.a.j.util.Text
> ---------------------------------------------------------
>
>                 Key: JCR-5152
>                 URL: https://issues.apache.org/jira/browse/JCR-5152
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-jcr-commons
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: 2.24, 2.23.2, 2.22.2
>
>
> Currently there is only https://jackrabbit.apache.org/api/trunk/org/apache/jackrabbit/util/Text.html#escapeIllegalJcrChars(java.lang.String) and https://jackrabbit.apache.org/api/trunk/org/apache/jackrabbit/util/Text.html#unescapeIllegalJcrChars(java.lang.String) but no direct method which allows to check whether a name needs escaping or not.
> Just checking the return value of {{Text.escapeIllegalJcrChars(...)}} is not suitable, as this will even escape the percent character ({{%}}) which is valid in JCR names. Also {{Text.escapeIllegalJcrChars(...)}} does not necessarily return a valid JCR name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)