Project

General

Profile

« Previous | Next » 

Revision 478

Added by Matthias almost 17 years ago

speeded up highlighting on big WYSIWYG pages;
fixed: '>' wasn't shown in highlighting result;
Thanks to thorn

View differences:

functions.php
488 488
		'Á'=>'Á','á'=>'á',
489 489
		'Â'=>'Â','â'=>'â','´'=>'´','Æ'=>'Æ','æ'=>'æ',
490 490
		'À'=>'À','à'=>'à','ℵ'=>'ℵ','Α'=>'Α','α'=>'α',
491
		'&'=>'&','∧'=>'∧','∠'=>'∠','''=>''','Å'=>'Å','å'=>'å',
491
		'∧'=>'∧','∠'=>'∠','''=>''','Å'=>'Å','å'=>'å',
492 492
		'≈'=>'≈','Ã'=>'Ã','ã'=>'ã','Ä'=>'Ä','ä'=>'ä',
493 493
		'„'=>'„','Β'=>'Β','β'=>'β','¦'=>'¦','•'=>'•',
494 494
		'∩'=>'∩','Ç'=>'Ç','ç'=>'ç','¸'=>'¸','¢'=>'¢',
......
501 501
		'Η'=>'Η','η'=>'η','Ð'=>'Ð','ð'=>'ð','Ë'=>'Ë','ë'=>'ë',
502 502
		'€'=>'€','∃'=>'∃','ƒ'=>'ƒ','∀'=>'∀','½'=>'½',
503 503
		'¼'=>'¼','¾'=>'¾','⁄'=>'⁄','Γ'=>'Γ','γ'=>'γ',
504
		'≥'=>'≥','>'=>'>','⇔'=>'⇔','↔'=>'↔','♥'=>'♥',
504
		'≥'=>'≥','⇔'=>'⇔','↔'=>'↔','♥'=>'♥',
505 505
		'…'=>'…','Í'=>'Í','í'=>'í','Î'=>'Î','î'=>'î',
506 506
		'¡'=>'¡','Ì'=>'Ì','ì'=>'ì','ℑ'=>'ℑ','∞'=>'∞',
507 507
		'∫'=>'∫','Ι'=>'Ι','ι'=>'ι','¿'=>'¿','∈'=>'∈',
508 508
		'Ï'=>'Ï','ï'=>'ï','Κ'=>'Κ','κ'=>'κ','Λ'=>'Λ',
509 509
		'λ'=>'λ','⟨'=>'〈','«'=>'«','⇐'=>'⇐','←'=>'←',
510 510
		'⌈'=>'⌈','“'=>'“','≤'=>'≤','⌊'=>'⌊','∗'=>'∗',
511
		'◊'=>'◊','‎'=>'‎','‹'=>'‹','‘'=>'‘','<'=>'<',
511
		'◊'=>'◊','‎'=>'‎','‹'=>'‹','‘'=>'‘',
512 512
		'¯'=>'¯','—'=>'—','µ'=>'µ','·'=>'·','−'=>'−',
513 513
		'Μ'=>'Μ','μ'=>'μ','∇'=>'∇',' '=>' ','–'=>'–',
514 514
		'≠'=>'≠','∋'=>'∋','¬'=>'¬','∉'=>'∉','⊄'=>'⊄',
......
540 540
	$numbered_to_named_entities=array(
541 541
		'Á'=>'Á','á'=>'á','Â'=>'Â','â'=>'â','´'=>'´',
542 542
		'Æ'=>'Æ','æ'=>'æ','À'=>'À','à'=>'à','ℵ'=>'ℵ',
543
		'Α'=>'Α','α'=>'α','&'=>'&','∧'=>'∧','∠'=>'∠',
543
		'Α'=>'Α','α'=>'α','∧'=>'∧','∠'=>'∠',
544 544
		'''=>''','Å'=>'Å','å'=>'å','≈'=>'≈','Ã'=>'Ã',
545 545
		'ã'=>'ã','Ä'=>'Ä','ä'=>'ä','„'=>'„','Β'=>'Β',
546 546
		'β'=>'β','¦'=>'¦','•'=>'•','∩'=>'∩','Ç'=>'Ç',
......
554 554
		'Ð'=>'Ð','ð'=>'ð','Ë'=>'Ë','ë'=>'ë','€'=>'€',
555 555
		'∃'=>'∃','ƒ'=>'ƒ','∀'=>'∀','½'=>'½','¼'=>'¼',
556 556
		'¾'=>'¾','⁄'=>'⁄','Γ'=>'Γ','γ'=>'γ','≥'=>'≥',
557
		'>'=>'>','⇔'=>'⇔','↔'=>'↔','♥'=>'♥','…'=>'…',
557
		'⇔'=>'⇔','↔'=>'↔','♥'=>'♥','…'=>'…',
558 558
		'Í'=>'Í','í'=>'í','Î'=>'Î','î'=>'î','¡'=>'¡',
559 559
		'Ì'=>'Ì','ì'=>'ì','ℑ'=>'ℑ','∞'=>'∞','∫'=>'∫',
560 560
		'Ι'=>'Ι','ι'=>'ι','¿'=>'¿','∈'=>'∈','Ï'=>'Ï',
561 561
		'ï'=>'ï','Κ'=>'Κ','κ'=>'κ','Λ'=>'Λ','λ'=>'λ',
562 562
		'〈'=>'⟨','«'=>'«','⇐'=>'⇐','←'=>'←','⌈'=>'⌈',
563 563
		'“'=>'“','≤'=>'≤','⌊'=>'⌊','∗'=>'∗','◊'=>'◊',
564
		'‎'=>'‎','‹'=>'‹','‘'=>'‘','<'=>'<','¯'=>'¯',
564
		'‎'=>'‎','‹'=>'‹','‘'=>'‘','¯'=>'¯',
565 565
		'—'=>'—','µ'=>'µ','·'=>'·','−'=>'−','Μ'=>'Μ',
566 566
		'μ'=>'μ','∇'=>'∇',' '=>' ','–'=>'–','≠'=>'≠',
567 567
		'∋'=>'∋','¬'=>'¬','∉'=>'∉','⊄'=>'⊄','Ñ'=>'Ñ',
......
695 695
		// decode html-entities
696 696
		if(preg_match("/&[#a-zA-Z0-9]+;/", $string)) {
697 697
			$string=string_decode_encode_entities($string, 'UTF-8', 'HTML-ENTITIES');
698
			//$string=mb_convert_encoding_wrapper($string, 'HTML-ENTITIES', 'UTF-8');
699
			//$string=mb_convert_encoding_wrapper($string, 'UTF-8', 'HTML-ENTITIES');
698 700
		}
699 701
	}
700 702
	else {
......
721 723
			$string=utf8_encode($string);
722 724
		}
723 725
		// encode html-entities
724
		$string=string_decode_encode_entities($string, 'HTML-ENTITIES', 'UTF-8');
725
		//$string=mb_convert_encoding_wrapper($string, 'HTML-ENTITIES', 'UTF-8');
726
		//$string=string_decode_encode_entities($string, 'HTML-ENTITIES', 'UTF-8');
727
		$string=mb_convert_encoding_wrapper($string, 'HTML-ENTITIES', 'UTF-8');
726 728
	}
727 729
	else {
728 730
		$string = string_to_utf8($string, $charset_in);
729 731
		// encode html-entities
730 732
		if (is_UTF8($string)) {
731
			$string=string_decode_encode_entities($string, 'HTML-ENTITIES', 'UTF-8');
732
			//$string=mb_convert_encoding_wrapper($string, 'HTML-ENTITIES', 'UTF-8');
733
			//$string=string_decode_encode_entities($string, 'HTML-ENTITIES', 'UTF-8');
734
			$string=mb_convert_encoding_wrapper($string, 'HTML-ENTITIES', 'UTF-8');
733 735
		}
734 736
	}
735 737
	return $string;

Also available in: Unified diff