次の依存関係とともにantisamy 1.5.3を使用しています
- バティック-1.5-fop-0.20-5.jar
- nekohtml-1.9.6.jar
- xercesImpl-2.9.1.jar
こんにちは、入力 HTML 文字列があります
str = "<p><ul>
<li><span style=\"font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif; font-size: 13px; line-height: 1.4em;\">Sample Output</span></li>
</ul>
</p>"
アンチサミーからの出力は同じになると思います。しかし、次の例外が発生します。どこが間違っているのか、この問題の回避策はありますか。
ERROR: ''
org.owasp.validator.html.ScanException: javax.xml.transform.TransformerException: java.lang.IllegalStateException
at org.owasp.validator.html.scan.AntiSamySAXScanner.scan(AntiSamySAXScanner.java:135)
at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:101)
at com.tibbr.antisamy.TibbrAntisamy.getCleancontent(TibbrAntisamy.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:470)
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:328)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:71)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:224)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:119)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:188)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_EVAL(ASTInterpreter.java:96)
at org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:175)
at org.jruby.RubyKernel.evalCommon(RubyKernel.java:1103)
at org.jruby.RubyKernel.eval(RubyKernel.java:1061)