diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java index 4d4b917ed4..a80ba95bc5 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java @@ -760,7 +760,7 @@ public final class PackagingURIHelper { }; private static boolean isUnsafe(int ch) { - return ch >= 0x80 || Character.isWhitespace(ch); + return ch >= 0x80 || ch == 0x7C || Character.isWhitespace(ch); } } diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java index 9969187422..3bbce458cb 100644 --- a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java +++ b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackagingURIHelper.java @@ -127,7 +127,8 @@ public class TestPackagingURIHelper { "..\\cygwin\\home\\yegor\\dinom\\%5baccess%5d.2010-10-26.log", "#'Instructions (Text)'!B21", "#'性'!B21", - "javascript://" + "javascript://", + "#ctl||rId16||cmdAddAction||_x0000_i1029" }; for(String s : href){