<commit_before>{extends 'layout_view.tpl'}

{block name="title"}
	<h3>{tr}Comments{/tr}
		<span class="lock">
			{if ! $parentId && $allow_lock}
				<a href="{bootstrap_modal controller=comment action=lock type=$type objectId=$objectId}" class="btn btn-link btn-sm tips" title="{tr}Comments unlocked{/tr}:{tr}Lock comments{/tr}">
					{icon name="unlock"}
				</a>
			{/if}
			{if ! $parentId && $allow_unlock}
				<a href="{bootstrap_modal controller=comment action=unlock type=$type objectId=$objectId}" class="btn btn-link btn-sm tips" title="{tr}Comments locked{/tr}:{tr}Unlock comments{/tr}">
					{icon name="lock"}
				</a>
			{/if}
		</span>
	</h3>
{/block}

{block name="content"}
	{if $cant gt 0}
		{include file="comment/list_inner.tpl"}
	{else}
		{remarksbox type=info title="{tr}No comments{/tr}"}
			{tr}There are no comments at this time.{/tr}
		{/remarksbox}
	{/if}

	{if $allow_post}
		<div class="submit">
			<div class="buttons comment-form {if $prefs.wiki_comments_form_displayed_default eq 'y'}autoshow{/if}">
				<a class="btn btn-primary custom-handling" href="{service controller=comment action=post type=$type objectId=$objectId}" data-target="#add-comment-zone-{$objectId|replace:' ':''|replace:',':''}">{tr}Post new comment{/tr}</a>
			</div>
		</div>
		<div id="add-comment-zone-{$objectId|replace:' ':''|replace:',':''}" class="add-comment-zone"></div>
	{/if}

	{if $prefs.feature_inline_comments eq 'y'}
		<a id="note-editor-comment" class="alert alert-info" style="display:none;" href="#">{tr}Add Comment{/tr}</a>
	{/if}

	<script type="text/javascript">
		var ajax_url = '{$base_url}';
		var objectId = '{$objectId|replace:"'":"\\'"}';
	</script>
{/block}<commit_msg>[FIX] HTML special characters escaping [FIX] JavaScript string special characters escaping<commit_after>{extends 'layout_view.tpl'}

{block name="title"}
	<h3>{tr}Comments{/tr}
		<span class="lock">
			{if ! $parentId && $allow_lock}
				<a href="{bootstrap_modal controller=comment action=lock type=$type objectId=$objectId}" class="btn btn-link btn-sm tips" title="{tr}Comments unlocked{/tr}:{tr}Lock comments{/tr}">
					{icon name="unlock"}
				</a>
			{/if}
			{if ! $parentId && $allow_unlock}
				<a href="{bootstrap_modal controller=comment action=unlock type=$type objectId=$objectId}" class="btn btn-link btn-sm tips" title="{tr}Comments locked{/tr}:{tr}Unlock comments{/tr}">
					{icon name="lock"}
				</a>
			{/if}
		</span>
	</h3>
{/block}

{block name="content"}
	{if $cant gt 0}
		{include file="comment/list_inner.tpl"}
	{else}
		{remarksbox type=info title="{tr}No comments{/tr}"}
			{tr}There are no comments at this time.{/tr}
		{/remarksbox}
	{/if}

	{if $allow_post}
		<div class="submit">
			<div class="buttons comment-form {if $prefs.wiki_comments_form_displayed_default eq 'y'}autoshow{/if}">
				<a class="btn btn-primary custom-handling" href="{service controller=comment action=post type=$type objectId=$objectId}" data-target="#add-comment-zone-{$objectId|replace:' ':''|replace:',':''|escape:'attr'}">{tr}Post new comment{/tr}</a>
			</div>
		</div>
		<div id="add-comment-zone-{$objectId|replace:' ':''|replace:',':''|escape:'attr'}" class="add-comment-zone"></div>
	{/if}

	{if $prefs.feature_inline_comments eq 'y'}
		<a id="note-editor-comment" class="alert alert-info" style="display:none;" href="#">{tr}Add Comment{/tr}</a>
	{/if}

	<script type="text/javascript">
		var ajax_url = '{$base_url}';
		var objectId = '{$objectId|escape:'javascript'}';
	</script>
{/block}
{'fraction_non_alphanumeric': 0.2102710413694722, 'fraction_numerical': 0.0017118402282453639, 'mean_word_length': 5.271914132379249, 'pattern_counts': {'":': 1, '<': 43, '<?xml version=': 0, '>': 43, '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': '5739757', 'n_tokens_mistral': 1391, 'n_tokens_neox': 1260, 'n_words': 259}