<commit_before><?php
    style("drawio", "editor");
    script("drawio", "editor");

    $frame_params = "?embed=1";
    if (!empty($_["theme"])) $frame_params .= "&ui=".$_["theme"];
    if (!empty($_["lang"])) $frame_params .= "&lang=".$_["lang"];
    $frame_params .= "&spin=1&proto=json";
?>

<div id="app">

    <iframe id="iframeEditor" width="100%" height="100%" align="top" frameborder="0" name="iframeEditor" onmousewheel="" allowfullscreen=""></iframe>

    <script type="text/javascript" nonce="<?php p(base64_encode($_["requesttoken"])) ?>" defer>
		window.addEventListener('DOMContentLoaded', function() {
			<?php if (!empty($_['error'])) { ?>
				OCA.DrawIO.DisplayError("<?php p($_['error']) ?>");
			<?php } else { ?>
				var iframe = $("#iframeEditor")[0];
				var filePath = "<?php p($_['filePath']); ?>";
				var originUrl = "<?php p($_['drawioUrl']); ?>";
				var drawIoUrl = "<?php p($_['drawioUrl']); print_unescaped($frame_params); ?>"
				OCA.DrawIO.EditFile(iframe.contentWindow, filePath, originUrl);
				iframe.setAttribute('src', drawIoUrl );
			<?php } ?>
		});
    </script>

</div>
<commit_msg>fix filePath when containing special characters<commit_after><?php
    style("drawio", "editor");
    script("drawio", "editor");

    $frame_params = "?embed=1";
    if (!empty($_["theme"])) $frame_params .= "&ui=".$_["theme"];
    if (!empty($_["lang"])) $frame_params .= "&lang=".$_["lang"];
    $frame_params .= "&spin=1&proto=json";
?>

<div id="app">

    <iframe id="iframeEditor" width="100%" height="100%" align="top" frameborder="0" name="iframeEditor" onmousewheel="" allowfullscreen=""></iframe>

    <script type="text/javascript" nonce="<?php p(base64_encode($_["requesttoken"])) ?>" defer>
		window.addEventListener('DOMContentLoaded', function() {
			<?php if (!empty($_['error'])) { ?>
				OCA.DrawIO.DisplayError("<?php p($_['error']) ?>");
			<?php } else { ?>
				var iframe = $("#iframeEditor")[0];
				var filePath = "<?php echo urldecode($_['filePath']); ?>";
				var originUrl = "<?php p($_['drawioUrl']); ?>";
				var drawIoUrl = "<?php p($_['drawioUrl']); print_unescaped($frame_params); ?>"
				OCA.DrawIO.EditFile(iframe.contentWindow, filePath, originUrl);
				iframe.setAttribute('src', drawIoUrl );
			<?php } ?>
		});
    </script>

</div>

{'fraction_non_alphanumeric': 0.24640835872877667, 'fraction_numerical': 0.01044841097083152, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4524238', 'n_tokens_mistral': 855, 'n_tokens_neox': 760, 'n_words': 138}