node-html-to-text
node-html-to-text copied to clipboard
Should not remove server and/or templating tags
Given the following,
<p>Hello, <?php echo $name ?></p>
It makes no sense to strip out the <?php ... ?> part.
This applies to other template styles, such as <% ... %> or shorthand styles <?= ... ?>.
Simplest solution to this would probably to have tag suffice/prefix pair exclusion rules.
eg. [ ['<%', '%>'], [ '<?', '?>' ] ...
The problem is I need to strip out all content that is not usable for a text representation. This includes PHP tags which would normally interpreted by your PHP engine. I would suggest to escape all php tags, cause you want them to be displayed instead of interpreted.
I actually want them to be interpreted.