Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

HTML Parser deletes Script tags

Avatar

Level 2

Hi everyone, I am working with html parser to modify some ulr's on my pages, but in this cases deletes the tag almost completely. Here is my config.

Example: <script src="somejs.js"></script>

Result after htmlparser= </script>

Any help are wellcome.

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root

    xmlns:sling="http://sling.apache.org/jcr/sling/1.0"

    xmlns:jcr="http://www.jcp.org/jcr/1.0"

    jcr:primaryType="nt:unstructured"

    transformerTypes="[linktype]"

    contentTypes="[text/html]"

    enabled="{Boolean}true"

    generatorType="htmlparser"

    order="1000"

    paths="[__random-value__]"

    serializerType="htmlwriter">

    <generator-htmlparser

        jcr:primaryType="nt:unstructured"

        includeTags="[IMG,SCRIPT,SOURCE,LINK]"/>

</jcr:root>

0 Replies