Skip to content
Snippets Groups Projects
Unverified Commit 8aa7f263 authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Correction du filtre des iframes (#787)

parent 18b2ae5d
No related branches found
No related tags found
No related merge requests found
{{ $chunks := split . "<iframe" }}
{{ $text := delimit $chunks "<iframe loading=\"lazy\"" }}
{{ $chunks = split $text "</iframe>" }}
{{ $text = delimit $chunks "</iframe>" }}
{{ $is_loading_present := strings.Contains . "loading" }}
{{ $text := . }}
{{ if not $is_loading_present }}
{{ $chunks := split . "<iframe" }}
{{ $text = delimit $chunks "<iframe loading=\"lazy\"" }}
{{ $chunks = split $text "</iframe>" }}
{{ $text = delimit $chunks "</iframe>" }}
{{ end }}
{{ return $text }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment