Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape any stray CDATA end tokens that may be in the post contents #396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 14, 2023

  1. Escape any stray CDATA end tokens that may be in the post contents

    Normally you wouldn't have any CDATA end tokens ]]> in post content, because > gets converted to >. However, in certain circumstances, like HTML comments, one can slip through unescaped.
    
    The only real way to escape CDATA end tokens is to split them up. I.e. instead of having a single string ]]>, we instead have ]](end CDATA)(start another CDATA)>. The two adjacent CDATAs will then be concatenated. That looks like this very messy string: ]]]]><![CDATA[>
    Kronopath committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    d7c0c3f View commit details
    Browse the repository at this point in the history