<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

add_filter(
	'wp_kses_allowed_html',
	static function ( $tags, $context ) {
		if ( 'deploy_sync_content__diff_output' !== $context ) {
			return $tags;
		}

		// We use the post tags as the starting point.
		$allowed_html = wp_kses_allowed_html( 'post' );

		// Add tags and any tag needed by the diff output.
		$allowed_html['input'] = array(
			'checked' => true,
			'name'    => true,
			'type'    => true,
			'value'   => true,
		);

		$allowed_html['form'] = array(
			'action'         => true,
			'accept'         => true,
			'accept-charset' => true,
			'enctype'        => true,
			'method'         => true,
			'name'           => true,
			'target'         => true,
		);

		return $allowed_html;
	},
	10,
	2
);
