We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
点击右侧链接定位锚点js报错,且无动画
附修复代码: /** * 解决问题:锚点动画报错 * 现象:点击右侧链接定位锚点js报错,且无动画 * 原因:当url进行base64_encode后,字符中包含:!"#$%&'()*+,./:;<=>?@[\]^{|}~ * 解决方案:将以上字符替换成空 * / public function doBase64Encode($url) { $replaceChars = ['!', '"', '#', '$', '%', '&', "'", '(', ')', '', '+', ',', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\', ']', '^', '', '{', '|', '}', '~']; return str_replace($replaceChars, '', base64_encode($url)); }
/** * 解决问题:锚点动画报错 * 现象:点击右侧链接定位锚点js报错,且无动画 * 原因:当url进行base64_encode后,字符中包含:!"#$%&'()*+,./:;<=>?@[\]^
', '{', '|', '}', '~']; return str_replace($replaceChars, '', base64_encode($url)); }
ApiDoc.php中原来使用base64_encode(url); 的两处代码改为:$this->doBase64Encode(url); @mumbaicat
The text was updated successfully, but these errors were encountered:
No branches or pull requests
点击右侧链接定位锚点js报错,且无动画
附修复代码:
/** * 解决问题:锚点动画报错 * 现象:点击右侧链接定位锚点js报错,且无动画 * 原因:当url进行base64_encode后,字符中包含:!"#$%&'()*+,./:;<=>?@[\]^
{|}~* 解决方案:将以上字符替换成空
* /
public function doBase64Encode($url)
{
$replaceChars = ['!', '"', '#', '$', '%', '&', "'", '(', ')', '', '+', ',', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', '\', ']', '^', '
', '{', '|', '}', '~']; return str_replace($replaceChars, '', base64_encode($url)); }
ApiDoc.php中原来使用base64_encode(url); 的两处代码改为:$this->doBase64Encode(url);
@mumbaicat
The text was updated successfully, but these errors were encountered: