의 미러
https://github.com/friendica/friendica
synced 2025-09-07 21:21:52 +02:00
Just some better handling of tracker variables (url encoding)
This commit is contained in:
부모
13fea42d8c
커밋
6a28ae8b52
1개의 변경된 파일과 11개의 추가작업 그리고 0개의 파일을 삭제
|
@ -1126,9 +1126,20 @@ function original_url($url, $depth=1, $fetchbody = false) {
|
|||
if (in_array($param, array("utm_source", "utm_medium", "utm_term", "utm_content", "utm_campaign",
|
||||
"wt_mc", "pk_campaign", "pk_kwd", "mc_cid", "mc_eid",
|
||||
"fb_action_ids", "fb_action_types", "fb_ref",
|
||||
"awesm",
|
||||
"woo_campaign", "woo_source", "woo_medium", "woo_content", "woo_term"))) {
|
||||
|
||||
$pair = $param."=".urlencode($value);
|
||||
$url = str_replace($pair, "", $url);
|
||||
|
||||
// Second try: if the url isn't encoded completely
|
||||
$pair = $param."=".str_replace(" ", "+", $value);
|
||||
$url = str_replace($pair, "", $url);
|
||||
|
||||
// Third try: Maybey the url isn't encoded at all
|
||||
$pair = $param."=".$value;
|
||||
$url = str_replace($pair, "", $url);
|
||||
|
||||
$url = str_replace(array("?&", "&&"), array("?", ""), $url);
|
||||
}
|
||||
|
||||
|
|
불러오는 중…
테이블 추가
Add a link
Reference in a new issue