<commit_before><?php

require_once('bbcode.php');

function share_init(&$a) {

	$post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
	if((! $post_id) || (! local_user()))
		killme();

	$r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
		intval($post_id)
	);
	if(! count($r) || $r[0]['private'])
		killme();

	$o = '';

	if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) {
		$o .= '&#x2672; [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]';
		if($r[0]['title'])
			$o .= '[b]' . $r[0]['title'] . '[/b]' . "\n";
		$o .= $r[0]['body'] . "\n";
	}
	else {
		$o .= '&#x2672; <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
		if($r[0]['title'])
			$o .= '<strong>' . $r[0]['title'] . '</strong><br />';
		$o .= bbcode($r[0]['body'], true) . '<br />';
	}
	echo $o;
	killme();  
}
<commit_msg>fix recycle symbol when using plaintext editor<commit_after><?php

require_once('bbcode.php');

function share_init(&$a) {

	$post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
	if((! $post_id) || (! local_user()))
		killme();

	$r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
		intval($post_id)
	);
	if(! count($r) || $r[0]['private'])
		killme();

	$o = '';

	if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) {
		$o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]';
		if($r[0]['title'])
			$o .= '[b]' . $r[0]['title'] . '[/b]' . "\n";
		$o .= $r[0]['body'] . "\n";
	}
	else {
		$o .= '&#x2672; <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
		if($r[0]['title'])
			$o .= '<strong>' . $r[0]['title'] . '</strong><br />';
		$o .= bbcode($r[0]['body'], true) . '<br />';
	}
	echo $o;
	killme();  
}

{'fraction_non_alphanumeric': 0.34775280898876404, 'fraction_numerical': 0.025842696629213482, 'mean_word_length': 3.486146095717884, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, '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': '2429492', 'n_tokens_mistral': 852, 'n_tokens_neox': 800, 'n_words': 136}