java - 是不是segementfault的bug? 提问时输入两个反斜线,显示出来会变成一个?
大家讲道理
大家讲道理 2017-04-18 09:39:48
0
4
463
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(4)
迷茫

This is not Markdown’s syntax (segmentfault uses the compiler’s syntax by default)

You can use one来转义

输入
UUID.randomUUID().toString().replaceAll("\\-", "")

Result display:
UUID.randomUUID().toString().replaceAll("\-", "")

Ty80
UUID.randomUUID().toString().replaceAll("\-", "")

The code is surrounded by three [`].

阿神

Translation symbols, which are encountered in many languages. For special characters, translate them by adding "".

伊谢尔伦

Possible reasons
1 Because he uses htmlspecialchars_encode($string) when storing it
2 So when he displays it, he uses htmlspecialchars_decode($string);
3 htmlspecialchars_decode will convert \ to

Verification
You can click Edit, and you will find that it displays the content you originally entered, which means there is a display problem. This method is commonly used in PHP and can cause this situation.
Because the content of the multi-text edit box does not use htmlspecialchars_decode, the original text is displayed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!