Cure for 'The string “--” is not permitted within comments.' exception?

前端 未结 2 851
我寻月下人不归
我寻月下人不归 2020-12-09 15:47

I\'m using Java 6. I have this dependency in my pom ...

            
                    xerces
                    


        
相关标签:
2条回答
  • 2020-12-09 16:23

    Your document must have at least an extra "-". Might be you have written:

    <!--- --> or
    <!--- ---> or
    <!-- ---> etc.
    
    0 讨论(0)
  • 2020-12-09 16:34

    By definition:

    A comment starts and ends with "--", and does not contain any occurrence of "--".

    So no, your XHTML is not well-formed because you can't use -- anywhere inside a comment. Can you replace it by something else? or maybe put a space in-between, like this: - -. There really isn't a clean solution to this problem, any alternatives involve messing around with placeholders, encodings, etc.

    0 讨论(0)
提交回复
热议问题