https://bz.apache.org/bugzilla/show_bug.cgi?id=64108

--- Comment #3 from Richard Costine <r...@costine.org> ---
Something like this code would do it:


    private static boolean isUnsafe(int ch) {
        boolean safePipeInUri = true; // assume we will fail like before.
        try {
            // set this System property to false to make it not fail
            safePipeInUri =
Boolean.parseBoolean(System.getProperty("org.apache.poi.openxml4.opc.safePipeInURI",
"false"));
        }
        catch (Throwable t) { } // defaults to true if the property is not
readable

        // safe pipe in URI, means that a "|" will fail like before
        return safePipeInUri ? (ch >= 0x80 || Character.isWhitespace(ch))
                : (ch >= 0x80 || ch == 0x7C || Character.isWhitespace(ch));
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to