Giter Club home page Giter Club logo

html-sanitizer's Introduction

TYPO3 CMS

TYPO3 is an open source PHP based web content management system released under the GNU GPL. TYPO3 is copyright © 1999-2024 by Kasper Skårhøj.

This document provides a basic introduction to TYPO3.

Getting Started

TYPO3 requires a web server with PHP and a database. The backend is accessed via a supported browser.

Please see the Installation Guide in order to set up a basic TYPO3 installation on your web server.

What is TYPO3?

TYPO3 is a free and open source Content Management Framework. It is released under the GNU General Public License. It can run on several web servers, such as Apache, nginx or IIS, on top of many operating systems, among them Linux, Microsoft Windows, FreeBSD or macOS.

TYPO3 was initially authored by Kasper Skårhøj and is now further developed by a community of contributors and the TYPO3 Core Development Team.

To get more info about the GPL license, visit https://opensource.org/licenses/gpl-license

What is a Content Management Framework?

A Content Management Framework is more than just a content management system, due to the separation of the streamlined core and optional plugins (extensions). TYPO3 has an open API that allows you to extend the frontend (website) and/or backend (administration) functionality.

The concept of extensions makes TYPO3 capable of being developed and used in almost any way you can imagine, either by using any of the many extensions which are available for download, or by writing your own.

TYPO3 System requirements

TYPO3 is based upon PHP and uses a database management system like MySQL.

For more specific information regarding requirements see the file INSTALL.md in this folder.

TYPO3 resources

Here is an overview of the most important TYPO3 resources to help you get started:

Get more information

  • https://typo3.org/ is the main project website. It provides up-to-date official news, information about events and the TYPO3 community.

  • https://docs.typo3.org/: TYPO3 is one of the most thoroughly documented OpenSource products around, with manuals covering basic tutorials, TypoScript, administration, development, core structure, etc. You should make the time to locate the various documents, and read those that apply to the work you want to do.

  • https://get.typo3.org/ is the platform where you can download TYPO3 and find all release notes and change logs of TYPO3 releases.

  • https://extensions.typo3.org/ is the platform where you can search for and download TYPO3 extensions.

Chat with us

The TYPO3 community is using a tool called Slack to openly communicate with each other and with the public. Several TYPO3 teams use Slack as a way to communicate internally and most channels are a welcome place for you to join and get yourself involved.

Exchange information, ask questions, get help

Slack is nice for short discussions, but when asking questions, most answers are lost in the noise after a few minutes.

StackOverflow

To let everyone profit from an answer, we recommend to ask questions on StackOverflow. If you like, you can then post a link into the corresponding Slack channel to raise attention. And please, do not forget to tag your questions correctly with typo3 (and possibly other tags like typo3-9.5.x, Fluid or Extbase).

Official meet the TYPO3 Community overview:

Visit https://typo3.org/community/meet/

Contributing

If you want to contribute to the TYPO3 source code, take a look at our Contributors Walkthrough and Review System:

Please use the TYPO3 Slack chat, if you need help in setting up your contribution environment. The community is very helpful and get you up and running! (Please post your questions in Slack Channel #typo3-cms-coredev regarding contribution support)

The repository at GitHub is a synchronized mirror of the primary TYPO3 core git repository:

If you want to file a bug report, take a look at:

Security

If you learn about a potential security issue in the TYPO3 core or in an extension, please always contact the TYPO3 Security Team via [email protected]. Please always include the version number where you've discovered the issue. If we can confirm a problem in a third-party extension, we will inform the author immediately.

If you discover a security problem in your own extension, please inform the TYPO3 Security Team as well. They can help you to fix it, and they may want to issue an advisory once it is fixed.

For more details see TYPO3 Security Team.

Final notes

TYPO3 is said to be one of the most sophisticated PHP / Internet related applications available, and the more you play with it, the more you will agree.

Due to the advanced level of the code and functionality, a degree of study, time and perseverance is required to fully understand it, and get the best from it. You should keep trying, as we say it's definitely worth it. TYPO3 is the Enterprise Content Management System "for all".

The GPL license allows for developments that are based upon TYPO3 to also be freely available under the GPL. Please remember this, because TYPO3 is about "Inspiring People To Share". If you are making money with TYPO3 you can donate or become a member of the TYPO3 Association.

By becoming a supporting member, individuals and organisations mainly fund core development of TYPO3. The decision about what the funds are used for, is made by all members of the Association and the TYPO3 Association Board. The decisions will be made transparent to the community and especially the supporting members. Your funds will also serve for other purposes as laid out in the bylaws.

Copyleft

This document is a part of the TYPO3 project.

html-sanitizer's People

Contributors

andreaskienast avatar bnf avatar crell avatar derhansen avatar dpi avatar kevin-appelt avatar lolli42 avatar ohader avatar schlotzz avatar xerc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html-sanitizer's Issues

Add deprecated, legacy or missing markup declarations

Found invalid attribute table.summary - {"behavior":"default","nodeName":"table","attrName":"summary"}
Found invalid attribute table.cellspacing - {"behavior":"default","nodeName":"table","attrName":"cellspacing"}
Found invalid attribute table.cellpadding - {"behavior":"default","nodeName":"table","attrName":"cellpadding"}
Found invalid attribute table.border - {"behavior":"default","nodeName":"table","attrName":"border"}
Found invalid attribute table.align - {"behavior":"default","nodeName":"table","attrName":"align"}

center-tag missing, too

Hi,
I had the same issue as #23 with

: all Text and content with Center-Tag around comes out in visible brackets.
We found out late because it was in the newsletter-archive.
htmlSanitize = 0 is working:
page.stdWrap.parseFunc.htmlSanitize = 0
The Problem appeared in 10.4.21
with the best regards,
Sabine

Tag <font ...> missing (xhtml, html < 5)

As you can see in the attachment, the "font" tags are outputed.
(possible attributes: "font", "color", "size").

Please add it to TYPO3\HtmlSanitizer\Builder\CommonBuilder.
Or, if you prefer, delete them altogether (since this is not an HTML5 standard).

According to #23

Thank you.

tag-font-example

iFrame is escaped in output and not working anymore

Since some versions there is a problem that iFrames are escaped in the output and the iframe is not visible. Before 10.4.18 i think it was working fine. Not the problem is that the youtube plugin for the RTE isn't working anymore.

Version is 10.4.21 (Composer latest version)

<p>&lt;iframe allowfullscreen frameborder="0" height="360"
  src="https://www.youtube.com/embed/fUEHlY8" width="640"&gt;&lt;/iframe&gt;</p>

So i have checked not a lot of tutorials and tested now over 2 hours all solutions.

In the Site TS-Config i have tested a low of things.

RTE.default.proc {
  allowTags := addToList(object,param,embed,iframe)
  allowTagsOutside := addToList(object,embed,iframe)
  entryHTMLparser_db.allowTags < .allowTags
}

But nothing is working anymore. Is there a solution or a fix to solve the Problem? Do i miss something?

Add different protocols for href such as webcal or ftp

I use links like webcal://domain.tld/calendar/ics for having the OS open a calendar app like Apple Calendar and offer the calendar subscription dialogue. For those links the href gets stripped from the output HTML.

It would be great to add various other common protocols like e.g. webcal, ftp, file or at least offer a simple configuration method to add these to a website instead of having to add a complicated PHP class (not to mention that at this point in time I have found a tutorial on how to allow additional tags and attributes, but not a different link protocol).

Introduce TagHandler

$behavior = (new Behavior())
    ->withFlags(Behavior::ENCODE_INVALID_TAG)
    ->withTags(
        (new Behavior\TagHandler('svg', \My\SvgTagHandler::class))

For this particular example using svg, e.g. https://github.com/darylldoyle/svg-sanitizer can be invoked in a to be defined SvgTagHandler. However, this library should stay independent from other libraries (the specific handler would be something for TYPO3 which already has a dependency on SVG Sanitizer).

Postpone Sanitizer deprecations

The deprecation introduced with PR #98 at

if (!$this->behavior instanceof Behavior) {
trigger_error(
'Add `Behavior` when creating new `Sanitizer` instances, e.g. `new Sanitizer($behavior, $visitor)`',
E_USER_DEPRECATED
);
}
has to be postponed to a later release, since chances are high that it leads to more trouble in individual build processes, e.g. like https://git.typo3.org/typo3/CI/cms/-/pipelines/34627

Allow adding allowed values to existing attributes

I've come to code where custom onclick is added to a-Tags.
TYPO3 already ads an onclick to allow list for a-Tags.

I could not find any way to add another allowed value to the list.
Looks like the code is too robust to allow me to add or alter the already configured behaviour.
I only could remove the already build a-Tag and build it from scratch / from reading original values excluding the onclick and rebuilding it again?
Do I overlook something here? How should a developer use the library in such situation, where a framework already adds configuration?

That's our code which is just not called, because TYPO3 onclick value already does not match. Further values are not checked anymore. I couldn't find a way to check whether at least one value matches.

class DefaultSanitizerBuilder extends Typo3DefaultSanitizerBuilder
{
    protected function createBasicTags(): array
    {
        $tags = parent::createBasicTags();
        // Allow onlick="econdaTrackMarker();" in addition to TYPO3 native onclick code.
        $tags['a']->getAttr('onclick')->addValues(new RegExpAttrValue('#^econdaTrackMarker\(#'));
        return $tags;
    }
}

TYPO3 HTML Element doesn't work anymore

The TYPO3 standard HTML content element uses <f:format.raw>{data.bodytext}</f:format.raw> .

We have inserted iframes like this:
<iframe id="auto-iframe" name="auto-iframe" src="https://lademap.ladenetz.de/?lat=48.3434118&amp;lng=10.8921117&amp;zoom=12&amp;mode=1&amp;ivin=09ut249ugn9854h8bffd43" scrolling="no" onload="AutoiFrameAdjustiFrameHeight('auto-iframe',50);" width="100%" height="650px" frameborder="0"></iframe>

But since last T3 update it is shown plain in FE.

I tried:

page.10.stdWrap.parseFunc {
    // replace --- with soft-hyphen
    short.--- = &shy;
    // sanitization of ALL MARKUP is NOT DESIRED here
    htmlSanitize = 0
  }

// either disable globally
lib.parseFunc.htmlSanitize = 0
lib.parseFunc_RTE.htmlSanitize = 0

But it ist not fixed. Could you please tell me how to get it work now without htmlSanitze?

Yours,
mike

ALLOW_CHILDREN and PURGE_WITHOUT_ATTRS can't be set at the same time

I want to use a certain tag that should be allowed to have children. In this case I'd use ALLOW_CHILDREN as a flag on my new tag.

But what if I want to allow it only if it has a specific attribute on it, like a must-have attribute?

I can't give it both flags, only one. So I have to decide whether it shows its content or shows itself if it has an attribute, but then it doesn't render the content inside of it.

Also, what is it with PURGE_WITHOUT_CHILDREN? This can't be used since you'd have to allow children in the first place. If I use this flag, I get "Tag %s does not allow children, but shall be purged without them", what's the point of setting this flag then?

Argument 1 passed to TYPO3\HtmlSanitizer\Behavior\Tag::addAttrs() must be of the type array, object given

Hello, I have no idea if I'm at the right place here or if this should be posted in the TYPO3 forge. Sorry if I'm wrong here.

I'm using an ELTS Version of TYPO3 8 with PHP 7.4.33 for my website. Since the 8.7.49 update I can't view any pages in the frontend or backend (page & list module) with the error
Argument 1 passed to TYPO3\HtmlSanitizer\Behavior\Tag::addAttrs() must be of the type array, object given, called in /var/www/html/src/vendor/typo3/cms/typo3/sysext/core/Classes/Html/DefaultSanitizerBuilder.php on line 75.

The release notes of that version show an upgrade to v.1.5.0 of the HTML-Sanitizer.

I'm not well-versed in anything programming related but opening the file from the error gives the following warning in PHPStorm:
Expected parameter of type '\TYPO3\HtmlSanitizer\Behavior\Attr[]', '\TYPO3\HtmlSanitizer\Behavior\Attr' provided

If I add back the removed brackets in the createBasicTags() and build() functions of the DefaultSanitizerBuilder class everything works again:

        return GeneralUtility::makeInstance(Sanitizer::class, $visitor);

        $tags['a']->addAttrs(
            (new Behavior\Attr('onclick'))
                ->addValues(new Behavior\RegExpAttrValue('#^openPic\(#'))
        );

turns into

        return GeneralUtility::makeInstance(Sanitizer::class, [$visitor]);

        $tags['a']->addAttrs([
            (new Behavior\Attr('onclick'))
                ->addValues(new Behavior\RegExpAttrValue('#^openPic\(#'))
        ]);

The return statement still shows the warning
Return value is expected to be '\TYPO3\HtmlSanitizer\Sanitizer', 'object|\TYPO3\CMS\Core\SingletonInterface' returned
but the frontend and backend load again.

Turning off the sanitizer via TypoScript also "fixes" the error.

I've searched in the forge and on other sites but couldn't find anyone with the same issue, but I feel like this is an issue directly in TYPO3 or the sanitizer and not in the environment.

Links split up and rendered wrong with images and short texts

Hey, I'm having issues with TYPO3 HTML rendering in version 10.
Every time there is an image inside a href with little text, it splits them apart, thus destroying the link:

Original

<p>TITLE <em>ITALIC TEXT</em> basic text
<a href="PDF_LINK"><img alt="" data-htmlarea-file-uid="1787699" src="pdf_icon.png" /></a>
</p>

f:format.html output

<p>TITLE <em>ITALIC TEXT</em> basic text
<a href="PDF_LINK" target="_blank"></a>
</p>
<p><img src="pdf_icon.png"></p>

I tried Slack and also read this chain of issues (#23), but the problem still persists.

I can swap to raw, as there are typo3 internal links, that have to be rendered, and all the possible solutions either swapped to raw and broke internal links, or did nothing.

I'm running TYPO3 v10.4.20 with html-sanitizer v2.0.9
It's also a fresh update from v9.

RSS Feed: Opening and ending tag mismatch: br

XML requires that all tags be closed.
htmlSanitizer will output the br Tag as <br> instead of <br />

TypoScript Workaround:

rssfeed = PAGE
rssfeed {
  typeNum = 100
  ...
  stdWrap {
    replacement
      10 {
        search = <br>
        replace = <br />
      }
    }
  }
}

Add possibility to control comments and CDATA section

Up to typo3/html-sanitizer:2.0.16 is is only possible to work on DOMElement nodes using Tag declarations, DOMComment and DOMCdataSection cannot be controlled by any declaration yet. Comments and CDATA sections are implicitly allowed currently, which would have to be considered for backward compatibility, once this behavior is adjusted.

The new declaration might look like this:

use TYPO3\HtmlSanitizer\Behavior;

$behavior = (new Behavior())
    ->withFlags(Behavior::ENCODE_INVALID_COMMENT + Behavior::ENCODE_INVALID_CDATA_SECTION)
    ->withName('scenario-test')
    ->withTags(new Behavior\Tag('div', Behavior\Tag::ALLOW_CHILDREN))
    ->withNodes(new Behavior\Comment(), new Behavior\CdataSection());

Node is a new base term for Tag, Comment and CdataSection.

iframe tags inside rte content are broken

after Typo3 update to 10.4.19 or above all inserted iframes inside RTE content are broken.

In our yaml config we explicity allow iframe tags with extraAllowedContent: 'iframe[*]{*}' inside RTE content.

spamProtectEmailAddresses - JavaScript atSubst and lastDotSubst replacements broken

TESTED: (Working in 10.4.18 / breaks in 10.4.19)

config {
  # ascii / -5 to 1
  spamProtectEmailAddresses = -4
  # (at)
  spamProtectEmailAddresses_atSubst = <script type="text/javascript" language="JavaScript">document.write('@');</script><noscript>@</noscript>
  # (dot)
  spamProtectEmailAddresses_lastDotSubst = <script type="text/javascript" language="JavaScript">document.write('.');</script><noscript>.</noscript>
}

output/sourcecode (yes, all the whitespaces are also rendered)

<p>
    <a href="javascript:linkTo_UnCryptMailto(%27ocknvq%2CkphqBrtczku%5C%2Fmkghgt0fg%27);">E: mail&lt;script type="text/javascript" language="JavaScript"&gt;document.write('@');&lt;/script&gt;</a>
</p>
&lt;noscript&gt;@&lt;/noscript&gt;mail&lt;script type="text/javascript" language="JavaScript"&gt;document.write('.');&lt;/script&gt;&lt;noscript&gt;.&lt;/noscript&gt;com

output rendered:

MAIL<SCRIPT TYPE="TEXT/JAVASCRIPT" LANGUAGE="JAVASCRIPT">DOCUMENT.WRITE('@');</SCRIPT>

<noscript>@</noscript>mail<script type="text/javascript" language="JavaScript">document.write('.');</script><noscript>.</noscript>com

Expected behavior
output/sourcecode before update: (This one was working perfect!)

<a href="javascript:linkTo_UnCryptMailto(%27ocknvq%2CkphqBrtczku%5C%2Fmkghgt0fg%27);">E: mail<script type="text/javascript" language="JavaScript">document.write('@');</script>@<noscript>@</noscript>mail<script type="text/javascript" language="JavaScript">document.write('.');</script>.<noscript>.</noscript>com</a>

output rendered:

tx_form_formframework not working in TYPO3 11

TYPO3 extension form not showing correct/broken if use <f:format.html parseFuncTSPath="">:

<form enctype="multipart/form-data" method="post" id="kontaktformular-50" action="/kontakt?tx_form_formframework%5Baction%5D=perform&amp;tx_form_formframework%5Bcontroller%5D=FormFrontend&amp;cHash=d158ca0e601ac70a3252a9e6aa169797#kontaktformular-50">
<div><input type="hidden" name="tx_form_formframework[kontaktformular-50][__state]" value="TzozOToiVFlQTzNcQ01TXEZvcm1cRG9tYWluXFJ1bnRpbWVcRm9ybVN0YXRlIjoyOntzOjI1OiIAKgBsYXN0RGlzcGxheWVkUGFnZUluZGV4IjtpOjA7czoxMzoiACoAZm9ybVZhbHVlcyI7YTowOnt9fQ==1d9d97296996cb07f722d829563715ae20b1e425"><input type="hidden" name="tx_form_formframework[__trustedProperties]" value="{&quot;kontaktformular-50&quot;:{&quot;QP417ulHGiL2MCpgwFoU&quot;:1,&quot;singleselect-2&quot;:1,&quot;text-1&quot;:1,&quot;text-5&quot;:1,&quot;text-6&quot;:1,&quot;text-10&quot;:1,&quot;text-11&quot;:1,&quot;textarea-1&quot;:1,&quot;checkbox-1&quot;:1,&quot;__currentPage&quot;:1}}107a6a59c816e0c73ea65ed9777a2afdb6758376">
</div>

    &lt;input autocomplete="QP417ulHGiL2MCpgwFoU" aria-hidden="true" id="kontaktformular-50-QP417ulHGiL2MCpgwFoU" style="position:absolute; margin:0 0 0 -999em;" tabindex="-1" type="text" name="tx_form_formframework[kontaktformular-50][QP417ulHGiL2MCpgwFoU]"&gt;

ℹ️ Troubleshooting "broken markup after TYPO3 updates" (2021)

This issue aims to give some basic support concerning recent changes using this typo3/html-sanitizer package in order to mitigate cross-site scripting in user-submitted content.


FAQ

Q: Will there be new TYPO3 releases?
→ A: Yes, it happened already. TYPO3 version 11.3.3, 10.4.20, 9.5.30 have been release on Aug 16th, 2021 addressing these topics.


Broken markup, e.g. <figure>, <script>, <meta> (or similar) tags shown as content

In most cases this is caused by either an explicit parseFunc invocation in TypoScript or a <f:format.html> wrapping huge generated content blocks or data from external (and safe) sources.

Caused in FLUIDTEMPLATE (TypoScript)

parseFunc in the example below implicitly triggers HTML sanitization for every markup that has been generated - and leads to removing "invalid" tags - however sanitization only should be applied to user-submitted data (like rich-text input fields).

page.10 = FLUIDTEMPLATE
page.10 {
  variables { ... }
  stdWrap.parseFunc {
    short.--- = &shy;
  }
}

ℹ️ How to solve?
Since parseFunc triggers sanitization, it has to be disabled in that particular scenario, using htmlSanitize = 0 like shown below

page.10 = FLUIDTEMPLATE
page.10 {
  variables { ... }
  stdWrap.parseFunc {
    short.--- = &shy;
    // disable sanitization for top level rendering
    htmlSanitize = 0
  }
}

Caused by <f:format.html> (Fluid)

Fluid view-helper invocation <f:format.html>{content}</f:format.html> (or its inline variant {content -> f:format.html()}) internally uses lib.parseFunc_RTE, which again invokes ContentObjectRenderer::parseFunc() and triggers HTML sanitization.

<f:format.html>{content}</f:format.html>

ℹ️ How to solve?
In case {content} consists of generated markup that can be considered "safe", and if it actually should be used as it is, one might consider using <f:format.raw> which directly passes through the given {content}.

In case {content} is directly resolved from a rich-text field, retrieved from the database (e.g. like tt_content.bodytext), one should keep <f:format.html> to ensure proper mitigation of cross-site scripting. In this case, it really might be the case, that tags and/or attributes are missing in this typo3/html-sanitizer package.

<f:format.raw>{content}</f:format.raw>
<f:comment><!-- in case content really shall be taken "as is" --></f:comment>

Otherwise, in case content from rich-text fields contains tags and/or attributes that are missing in this html-sanitizer package, please create a new issue.

Caused by <f:format.html parseFuncTSPath=""> (Fluid)

Leaving parseFuncTSPath empty still calls ContentObjectRenderer::parseFunc() internally, but without providing any configuration.

<f:format.html parseFuncTSPath="">{content}</f:format.html>

As a result, htmlSanitize property also is not given (since no parseFunc configuration was given) - but was enabled as a "strong secure default".

ℹ️ How to solve?
<f:format.html parseFuncTSPath=""> did not have much effect and behaved like <f:format.raw>.
In this scenario only the encoding behavior of Fluid was disabled, but no tags were filtered and most probably cross-site scripting was possible in these custom templates.

<f:format.raw>{content}</f:format.raw>

Missing email links, using spamProtectEmailAddresses (TypoScript)

Using TypoScript config.spamProtectEmailAddresses creates something like shown below to obfuscate email addresses. URIs starting with javascript: are (correctly) considered harmful and typically using in cross-site scripting attacks.

<a href="javascript:linkTo_UnCryptMailto(%27ocknvq%2CkphqBrtczku%5C%2Fmkghgt0fg%27);">
  info(at)example.com</a>

ℹ️ How to solve?
This is considered a bug, a corresponding fix allows URI prefix javascript:linkTo_UnCryptMailto explicitly.
→ please see https://forge.typo3.org/issues/94776


Missing table attributes from CKEditor input

CKEditor in TYPO3 CMS allows to define tables and to define (legacy) HTML attributes like align, cellspacing and similar. It has been discovered that those legacy and deprecated attributes were removed.

ℹ️ How to solve?
This is considered a bug, a corresponding fix adds these missing attribute declaration to typo3/html-sanitizer.
→ please see https://github.com/TYPO3/html-sanitizer/pull/19/files

Broken markup when <font> tag is used

TYPO3-Version: 9.5.30

Today we had an issue with a content element of type "table". The editor had there a <font color="#f00"> tag used to highlight specific parts of the words in a cell. Since the update from 9.5.28 to 9.5.30 this behaviour has been occurred. We now fixed it by changing <f:format.html><f:format.nl2br>{cell}</f:format.nl2br></f:format.html> to <f:format.raw><f:format.nl2br>{cell}</f:format.nl2br></f:format.html> acoording to the advice given in #23.

Kind regards!

Mailto doesn't work if used with spamProtectEmailAddresses

With htmlSanitize mailto attribute is enabled, but if we have
config.spamProtectEmailAddresses = 1
then the generated tag looks like this:
<a href="javascript:linkTo_UnCryptMailto('ocknvq,hqqBdct0vnf');">foo(at)bar.tld</a>

The tag is generated before of sanitizing, and so the attribute href is being removed.

Add possibility to declare and apply presets to behavior

use TYPO3\HtmlSanitizer\Behavior;
use TYPO3\HtmlSanitizer\Builder\Preset\IframePreset;

$behavior = (new Behavior())
    ->withFlags(Behavior::ENCODE_INVALID_TAG | Behavior::REMOVE_UNEXPECTED_CHILDREN)
    ->withName('scenario-test')
    ->withPreset(new IframePreset());

Figure tag is missing and source tag does not allow necessary attributes

The source tag does not allow the needed attributes, but only the global ones.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attributes

The figure tag is missing completely.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element#text_content
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure


moderation side note by @ohader

HTML-encoded <figure> tags (or others) are not a bug of the typo3/html-sanitizer library per se, but instead indicate potential misconfiguration during content rendering via Fluid templates or TypoScript instructions. It is important to understand the security impact in custom templates. The fact that "it worked before" does not mean it was properly protected against cross-site scripting.

Find details at #23: Troubleshooting "broken markup after recent TYPO3 updates"

Forward sanitization initiator to logging

In order to detect potential flaws a new InitiatorInterface shall be introduced that contains individual stack-trace information and needs to be implemented by corresponding consumers (e.g. the TYPO3 CMS framework). This allows to debug invocations and their context better.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.