We need to figure out how Parsoid interacts with the concept of 'strip state' from the legacy parser.
The reason is that many existing extensions explicitly interact with strip state, for various reasons:
- Protecting rawHTML content from the sanitizer
- As an ad-hoc escape mechanism for template arguments ({{Foo|bar=<nowiki>something with |</nowiki>}} and then fetch the raw contents of the bar argument from the strip state)
- Explicitly as part of the Scribunto API
- other reasons yet to be discovered
There may not be one solution here, but as we port new extensions to Parsoid we need to come up with guidance for how the various uses of strip state get translated into the Parsoid extension API. This may (or may not) include adding an explicit "strip state" type API mechanism, or longer-term solutions (such as heredoc arguments instead of the ad-hoc <nowiki> argument escapes). There may be low-hanging fruit for certain uses (like tunneling content past the sanitizer) that can be forked off this task.