nothing2
V2EX  ›  问与答

电报 api sendMessage 方法推送带“&”链接问题

  •  
  •   nothing2 · May 29, 2022 · 988 views
    This topic created in 1469 days ago, the information mentioned may be changed or developed.

    通过 tg api 之 sendMessage 方法,推送带“&”链接,如 https://example.com/show?id=123&userid=456 ,推送后“&userid=456”被丢弃。应如何保护完整链接?

    ochatokori
        1
    ochatokori  
       May 29, 2022 via Android
    encodeURIComponent ?
    ik
        2
    ik  
       May 29, 2022 via iPhone
    用的 shell? 完整 url 用引号包起来
    nothing2
        3
    nothing2  
    OP
       May 29, 2022
    补充一下,为 php 代码,用单引号、双引号都不行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2411 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 00:24 · PVG 08:24 · LAX 17:24 · JFK 20:24
    ♥ Do have faith in what you're doing.