search

Home  >  Q&A  >  body text

java - 是不是segementfault的bug? 提问时输入两个反斜线,显示出来会变成一个?

大家讲道理大家讲道理2892 days ago506

reply all(4)I'll reply

  • 迷茫

    迷茫2017-04-18 09:41:48

    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("\-", "")

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:41:48

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

    The code is surrounded by three [`].

    reply
    0
  • 阿神

    阿神2017-04-18 09:41:48

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

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:41:48

    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

    reply
    0
  • Cancelreply