|
55 | 55 | $faq_url = 'http://docs.phpmyadmin.net/en/latest/faq.html';
|
56 | 56 |
|
57 | 57 | $replaces = array(
|
58 |
| - '@(http://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@' |
59 |
| - => '<a href="\\1">\\1</a>', |
| 58 | + '@(https?://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@' |
| 59 | + => '<a href="url.php?url=\\1">\\1</a>', |
60 | 60 |
|
61 | 61 | // sourceforge users
|
62 | 62 | '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +<(.*)@users.sourceforge.net>/i'
|
63 |
| - => '\\1 <a href="https://sourceforge.net/users/\\3/">\\2</a>', |
| 63 | + => '\\1 <a href="url.php?url=https://sourceforge.net/users/\\3/">\\2</a>', |
64 | 64 | '/thanks to ([^\(\r\n]+) \(([-\w]+)\)/i'
|
65 |
| - => 'thanks to <a href="https://sourceforge.net/users/\\2/">\\1</a>', |
| 65 | + => 'thanks to <a href="url.php?url=https://sourceforge.net/users/\\2/">\\1</a>', |
66 | 66 | '/thanks to ([^\(\r\n]+) -\s+([-\w]+)/i'
|
67 |
| - => 'thanks to <a href="https://sourceforge.net/users/\\2/">\\1</a>', |
| 67 | + => 'thanks to <a href="url.php?url=https://sourceforge.net/users/\\2/">\\1</a>', |
68 | 68 |
|
69 | 69 | // mail address
|
70 | 70 | '/([0-9]{4}-[0-9]{2}-[0-9]{2}) (.+[^ ]) +<(.*@.*)>/i'
|
71 | 71 | => '\\1 <a href="mailto:\\3">\\2</a>',
|
72 | 72 |
|
73 | 73 | // linking patches
|
74 | 74 | '/patch\s*#?([0-9]{6,})/i'
|
75 |
| - => '<a href="' . $tracker_url . '">patch #\\1</a>', |
| 75 | + => '<a href="url.php?url=' . $tracker_url . '">patch #\\1</a>', |
76 | 76 |
|
77 | 77 | // linking RFE
|
78 | 78 | '/(?:rfe|feature)\s*#?([0-9]{6,})/i'
|
79 |
| - => '<a href="https://sourceforge.net/support/tracker.php?aid=\\1">RFE #\\1</a>', |
| 79 | + => '<a href="url.php?url=https://sourceforge.net/support/tracker.php?aid=\\1">RFE #\\1</a>', |
80 | 80 |
|
81 | 81 | // linking files
|
82 | 82 | '/(\s+)([\\/a-z_0-9\.]+\.(?:php3?|html|pl|js|sh))/i'
|
83 |
| - => '\\1<a href="' . $github_url . 'commits/HEAD/\\2">\\2</a>', |
| 83 | + => '\\1<a href="url.php?url=' . $github_url . 'commits/HEAD/\\2">\\2</a>', |
84 | 84 |
|
85 | 85 | // FAQ entries
|
86 | 86 | '/FAQ ([0-9]+)\.([0-9a-z]+)/i'
|
87 |
| - => '<a href="' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>', |
| 87 | + => '<a href="url.php?url=' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>', |
88 | 88 |
|
89 | 89 | // linking bugs
|
90 | 90 | '/bug\s*#?([0-9]{6,})/i'
|
91 |
| - => '<a href="https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>', |
| 91 | + => '<a href="url.php?url=https://sourceforge.net/support/tracker.php?aid=\\1">bug #\\1</a>', |
92 | 92 |
|
93 | 93 | // all other 6+ digit numbers are treated as bugs
|
94 | 94 | '/(?<!bug|RFE|patch) #?([0-9]{6,})/i'
|
95 |
| - => '<a href="' . $tracker_url . '">bug #\\1</a>', |
| 95 | + => '<a href="url.php?url=' . $tracker_url . '">bug #\\1</a>', |
96 | 96 |
|
97 | 97 | // GitHub issues
|
98 | 98 | '/issue\s*#?([0-9]{4,5}) /i'
|
99 |
| - => '<a href="' . $github_url . 'issues/\\1">issue #\\1</a> ', |
| 99 | + => '<a href="url.php?url=' . $github_url . 'issues/\\1">issue #\\1</a> ', |
100 | 100 |
|
101 | 101 | // transitioned SF.net project bug/rfe/patch links
|
102 | 102 | // by the time we reach 6-digit numbers, we can probably retire the above links
|
103 | 103 | '/patch\s*#?([0-9]{4,5}) /i'
|
104 |
| - => '<a href="' . $tracker_url_patch . '">patch #\\1</a> ', |
| 104 | + => '<a href="url.php?url=' . $tracker_url_patch . '">patch #\\1</a> ', |
105 | 105 | '/(?:rfe|feature)\s*#?([0-9]{4,5}) /i'
|
106 |
| - => '<a href="' . $tracker_url_rfe . '">RFE #\\1</a> ', |
| 106 | + => '<a href="url.php?url=' . $tracker_url_rfe . '">RFE #\\1</a> ', |
107 | 107 | '/bug\s*#?([0-9]{4,5}) /i'
|
108 |
| - => '<a href="' . $tracker_url_bug . '">bug #\\1</a> ', |
| 108 | + => '<a href="url.php?url=' . $tracker_url_bug . '">bug #\\1</a> ', |
109 | 109 | '/(?<!bug|RFE|patch) #?([0-9]{4,5}) /i'
|
110 |
| - => '<a href="' . $tracker_url_bug . '">bug #\\1</a> ', |
| 110 | + => '<a href="url.php?url=' . $tracker_url_bug . '">bug #\\1</a> ', |
111 | 111 |
|
112 | 112 | // CVE/CAN entries
|
113 | 113 | '/((CAN|CVE)-[0-9]+-[0-9]+)/'
|
114 |
| - => '<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>', |
| 114 | + => '<a href="url.php?url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=\\1">\\1</a>', |
115 | 115 |
|
116 | 116 | // PMASAentries
|
117 | 117 | '/(PMASA-[0-9]+-[0-9]+)/'
|
118 |
| - => '<a href="https://www.phpmyadmin.net/security/\\1/">\\1</a>', |
| 118 | + => '<a href="url.php?url=https://www.phpmyadmin.net/security/\\1/">\\1</a>', |
119 | 119 |
|
120 | 120 | // Highlight releases (with links)
|
121 | 121 | '/([0-9]+)\.([0-9]+)\.([0-9]+)\.0 (\([0-9-]+\))/'
|
122 | 122 | => '<a name="\\1_\\2_\\3"></a>'
|
123 |
| - . '<a href="' . $github_url . 'commits/RELEASE_\\1_\\2_\\3">' |
| 123 | + . '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3">' |
124 | 124 | . '\\1.\\2.\\3.0 \\4</a>',
|
125 | 125 | '/([0-9]+)\.([0-9]+)\.([0-9]+)\.([1-9][0-9]*) (\([0-9-]+\))/'
|
126 | 126 | => '<a name="\\1_\\2_\\3_\\4"></a>'
|
127 |
| - . '<a href="' . $github_url . 'commits/RELEASE_\\1_\\2_\\3_\\4">' |
| 127 | + . '<a href="url.php?url=' . $github_url . 'commits/RELEASE_\\1_\\2_\\3_\\4">' |
128 | 128 | . '\\1.\\2.\\3.\\4 \\5</a>',
|
129 | 129 |
|
130 | 130 | // Highlight releases (not linkable)
|
|
0 commit comments