فهرست منبع

Punycode spelling mistake

https://github.com/FreshRSS/FreshRSS/pull/820
Alexandre Alapetite 11 سال پیش
والد
کامیت
06b76831de
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 1 0
      data/subscriptions/.gitignore
  2. 4 4
      lib/lib_rss.php

+ 1 - 0
data/subscriptions/.gitignore

@@ -0,0 +1 @@
+*/*

+ 4 - 4
lib/lib_rss.php

@@ -51,15 +51,15 @@ function classAutoloader($class) {
 spl_autoload_register('classAutoloader');
 //</Auto-loading>
 
-function idn_to_punny($url) {
+function idn_to_puny($url) {
 	if (function_exists('idn_to_ascii')) {
 		$parts = parse_url($url);
 		if (!empty($parts['host'])) {
 			$idn = $parts['host'];
-			$punny = idn_to_ascii($idn);
+			$puny = idn_to_ascii($idn);
 			$pos = strpos($url, $idn);
 			if ($pos !== false) {
-				return substr_replace($url, $punny, $pos, strlen($idn));
+				return substr_replace($url, $puny, $pos, strlen($idn));
 			}
 		}
 	}
@@ -73,7 +73,7 @@ function checkUrl($url) {
 	if (!preg_match ('#^https?://#i', $url)) {
 		$url = 'http://' . $url;
 	}
-	$url = idn_to_punny($url);	//PHP bug #53474 IDN
+	$url = idn_to_puny($url);	//PHP bug #53474 IDN
 	if (filter_var($url, FILTER_VALIDATE_URL) ||
 		(version_compare(PHP_VERSION, '5.3.3', '<') && (strpos($url, '-') > 0) &&	//PHP bug #51192
 		 ($url === filter_var($url, FILTER_SANITIZE_URL)))) {