Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E2641139A for ; Thu, 31 Jul 2014 09:49:39 +0000 (UTC) Received: (qmail 45339 invoked by uid 500); 31 Jul 2014 09:49:38 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 45184 invoked by uid 500); 31 Jul 2014 09:49:38 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 44959 invoked by uid 99); 31 Jul 2014 09:49:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2014 09:49:38 +0000 Date: Thu, 31 Jul 2014 09:49:38 +0000 (UTC) From: "broman (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (JCR-3800) Text.escapeIllegalXpathSearchChars escapes only last character MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 broman created JCR-3800: --------------------------- Summary: Text.escapeIllegalXpathSearchChars escapes only last character Key: JCR-3800 URL: https://issues.apache.org/jira/browse/JCR-3800 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-jcr-commons Affects Versions: 2.8 Reporter: broman Escaping special characters by using Text.escapeIllegalXpathSearchChars works only on last special character. fullText = "Moving to Alabama? Start Off on the Left Foot!"; println Text.escapeIllegalXpathSearchChars(fullText); Moving to Alabama? Start Off on the Left Foot\! fullText = "Moving to Alabama! Start Off on the Left Foot!"; println Text.escapeIllegalXpathSearchChars(fullText); Moving to Alabama! Start Off on the Left Foot\! fullText = "Moving to Alabama! Start Off on the Left Foot?"; println Text.escapeIllegalXpathSearchChars(fullText); Moving to Alabama! Start Off on the Left Foot\? And such partially escaped string cannot be used in full text search in JCR it doesn't throw errors but also doesn't return any nodes -- This message was sent by Atlassian JIRA (v6.2#6252)