also escape ? and & in tags
This commit is contained in:
		
							parent
							
								
									8651cc0d7a
								
							
						
					
					
						commit
						fb80509be9
					
				@ -473,6 +473,8 @@ function url_escape(?string $input): string
 | 
				
			|||||||
    $input = str_replace('^', '^^', $input);
 | 
					    $input = str_replace('^', '^^', $input);
 | 
				
			||||||
    $input = str_replace('/', '^s', $input);
 | 
					    $input = str_replace('/', '^s', $input);
 | 
				
			||||||
    $input = str_replace('\\', '^b', $input);
 | 
					    $input = str_replace('\\', '^b', $input);
 | 
				
			||||||
 | 
					    $input = str_replace('?', '^q', $input);
 | 
				
			||||||
 | 
					    $input = str_replace('&', '^a', $input);
 | 
				
			||||||
    $input = rawurlencode($input);
 | 
					    $input = rawurlencode($input);
 | 
				
			||||||
    return $input;
 | 
					    return $input;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -628,6 +628,12 @@ function _decaret(string $str): string
 | 
				
			|||||||
            if ($str[$i] == "b") {
 | 
					            if ($str[$i] == "b") {
 | 
				
			||||||
                $out .= "\\";
 | 
					                $out .= "\\";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            if ($str[$i] == "q") {
 | 
				
			||||||
 | 
					                $out .= "?";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if ($str[$i] == "a") {
 | 
				
			||||||
 | 
					                $out .= "&";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            $out .= $str[$i];
 | 
					            $out .= $str[$i];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user