Changeset 2517 for trunk/wp-includes/functions-formatting.php
- Timestamp:
- 04/05/2005 05:25:57 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-formatting.php
r2493 r2517 723 723 } 724 724 725 function ent2ncr($text) { 726 $to_ncr = array( 727 '"' => '"', 728 '&' => '&', 729 '⁄' => '/', 730 '<' => '<', 731 '>' => '>', 732 ' ' => ' ', 733 '¡' => '¡', 734 '¢' => '¢', 735 '£' => '£', 736 '¤' => '¤', 737 '¥' => '¥', 738 '\|' => '¦', 739 '¦' => '¦', 740 '&brkbar;' => '¦', 741 '§' => '§', 742 '¨' => '¨', 743 '¨' => '¨', 744 '©' => '©', 745 'ª' => 'ª', 746 '«' => '«', 747 '¬' => '¬', 748 '­' => '­', 749 '®' => '®', 750 '¯' => '¯', 751 '&hibar;' => '¯', 752 '°' => '°', 753 '±' => '±', 754 '²' => '²', 755 '³' => '³', 756 '´' => '´', 757 'µ' => 'µ', 758 '¶' => '¶', 759 '·' => '·', 760 '¸' => '¸', 761 '¹' => '¹', 762 'º' => 'º', 763 '»' => '»', 764 '¼' => '¼', 765 '½' => '½', 766 '¾' => '¾', 767 '¿' => '¿', 768 'À' => 'À', 769 'Á' => 'Á', 770 'Â' => 'Â', 771 'Ã' => 'Ã', 772 'Ä' => 'Ä', 773 'Å' => 'Å', 774 'Æ' => 'Æ', 775 'Ç' => 'Ç', 776 'È' => 'È', 777 'É' => 'É', 778 'Ê' => 'Ê', 779 'Ë' => 'Ë', 780 'Ì' => 'Ì', 781 'Í' => 'Í', 782 'Î' => 'Î', 783 'Ï' => 'Ï', 784 'Ð' => 'Ð', 785 'Ñ' => 'Ñ', 786 'Ò' => 'Ò', 787 'Ó' => 'Ó', 788 'Ô' => 'Ô', 789 'Õ' => 'Õ', 790 'Ö' => 'Ö', 791 '×' => '×', 792 'Ø' => 'Ø', 793 'Ù' => 'Ù', 794 'Ú' => 'Ú', 795 'Û' => 'Û', 796 'Ü' => 'Ü', 797 'Ý' => 'Ý', 798 'Þ' => 'Þ', 799 'ß' => 'ß', 800 'à' => 'à', 801 'á' => 'á', 802 'â' => 'â', 803 'ã' => 'ã', 804 'ä' => 'ä', 805 'å' => 'å', 806 'æ' => 'æ', 807 'ç' => 'ç', 808 'è' => 'è', 809 'é' => 'é', 810 'ê' => 'ê', 811 'ë' => 'ë', 812 'ì' => 'ì', 813 'í' => 'í', 814 'î' => 'î', 815 'ï' => 'ï', 816 'ð' => 'ð', 817 'ñ' => 'ñ', 818 'ò' => 'ò', 819 'ó' => 'ó', 820 'ô' => 'ô', 821 'õ' => 'õ', 822 'ö' => 'ö', 823 '÷' => '÷', 824 'ø' => 'ø', 825 'ù' => 'ù', 826 'ú' => 'ú', 827 'û' => 'û', 828 'ü' => 'ü', 829 'ý' => 'ý', 830 'þ' => 'þ', 831 'ÿ' => 'ÿ', 832 'Œ' => 'Œ', 833 'œ' => 'œ', 834 'Š' => 'Š', 835 'š' => 'š', 836 'Ÿ' => 'Ÿ', 837 'ƒ' => 'ƒ', 838 'ˆ' => 'ˆ', 839 '˜' => '˜', 840 'Α' => 'Α', 841 'Β' => 'Β', 842 'Γ' => 'Γ', 843 'Δ' => 'Δ', 844 'Ε' => 'Ε', 845 'Ζ' => 'Ζ', 846 'Η' => 'Η', 847 'Θ' => 'Θ', 848 'Ι' => 'Ι', 849 'Κ' => 'Κ', 850 'Λ' => 'Λ', 851 'Μ' => 'Μ', 852 'Ν' => 'Ν', 853 'Ξ' => 'Ξ', 854 'Ο' => 'Ο', 855 'Π' => 'Π', 856 'Ρ' => 'Ρ', 857 'Σ' => 'Σ', 858 'Τ' => 'Τ', 859 'Υ' => 'Υ', 860 'Φ' => 'Φ', 861 'Χ' => 'Χ', 862 'Ψ' => 'Ψ', 863 'Ω' => 'Ω', 864 'α' => 'α', 865 'β' => 'β', 866 'γ' => 'γ', 867 'δ' => 'δ', 868 'ε' => 'ε', 869 'ζ' => 'ζ', 870 'η' => 'η', 871 'θ' => 'θ', 872 'ι' => 'ι', 873 'κ' => 'κ', 874 'λ' => 'λ', 875 'μ' => 'μ', 876 'ν' => 'ν', 877 'ξ' => 'ξ', 878 'ο' => 'ο', 879 'π' => 'π', 880 'ρ' => 'ρ', 881 'ς' => 'ς', 882 'σ' => 'σ', 883 'τ' => 'τ', 884 'υ' => 'υ', 885 'φ' => 'φ', 886 'χ' => 'χ', 887 'ψ' => 'ψ', 888 'ω' => 'ω', 889 'ϑ' => 'ϑ', 890 'ϒ' => 'ϒ', 891 'ϖ' => 'ϖ', 892 ' ' => ' ', 893 ' ' => ' ', 894 ' ' => ' ', 895 '‌' => '‌', 896 '‍' => '‍', 897 '‎' => '‎', 898 '‏' => '‏', 899 '–' => '–', 900 '—' => '—', 901 '‘' => '‘', 902 '’' => '’', 903 '‚' => '‚', 904 '“' => '“', 905 '”' => '”', 906 '„' => '„', 907 '†' => '†', 908 '‡' => '‡', 909 '•' => '•', 910 '…' => '…', 911 '‰' => '‰', 912 '′' => '′', 913 '″' => '″', 914 '‹' => '‹', 915 '›' => '›', 916 '‾' => '‾', 917 '⁄' => '⁄', 918 '€' => '€', 919 'ℑ' => 'ℑ', 920 '℘' => '℘', 921 'ℜ' => 'ℜ', 922 '™' => '™', 923 'ℵ' => 'ℵ', 924 '↵' => '↵', 925 '⇐' => '⇐', 926 '⇑' => '⇑', 927 '⇒' => '⇒', 928 '⇓' => '⇓', 929 '⇔' => '⇔', 930 '∀' => '∀', 931 '∂' => '∂', 932 '∃' => '∃', 933 '∅' => '∅', 934 '∇' => '∇', 935 '∈' => '∈', 936 '∉' => '∉', 937 '∋' => '∋', 938 '∏' => '∏', 939 '∑' => '∑', 940 '−' => '−', 941 '∗' => '∗', 942 '√' => '√', 943 '∝' => '∝', 944 '∞' => '∞', 945 '∠' => '∠', 946 '∧' => '∧', 947 '∨' => '∨', 948 '∩' => '∩', 949 '∪' => '∪', 950 '∫' => '∫', 951 '∴' => '∴', 952 '∼' => '∼', 953 '≅' => '≅', 954 '≈' => '≈', 955 '≠' => '≠', 956 '≡' => '≡', 957 '≤' => '≤', 958 '≥' => '≥', 959 '⊂' => '⊂', 960 '⊃' => '⊃', 961 '⊄' => '⊄', 962 '⊆' => '⊆', 963 '⊇' => '⊇', 964 '⊕' => '⊕', 965 '⊗' => '⊗', 966 '⊥' => '⊥', 967 '⋅' => '⋅', 968 '⌈' => '⌈', 969 '⌉' => '⌉', 970 '⌊' => '⌊', 971 '⌋' => '⌋', 972 '⟨' => '〈', 973 '⟩' => '〉', 974 '←' => '←', 975 '↑' => '↑', 976 '→' => '→', 977 '↓' => '↓', 978 '↔' => '↔', 979 '◊' => '◊', 980 '♠' => '♠', 981 '♣' => '♣', 982 '♥' => '♥', 983 '♦' => '♦' 984 ); 985 986 foreach ($to_ncr as $entity => $ncr) { 987 $text = str_replace($entity, $ncr, $text); 988 } 989 return $text; 990 } 991 725 992 ?>
Note: See TracChangeset
for help on using the changeset viewer.