Files
openide/python/testData/completion/fStringLikeCompletionInsideUrl.py
Mikhail Golubev b3daaed02f PY-46178 Protect against illegal fragment expression in f-string-like completion
It's not enough to just prepend an arbitrary string with "f" to treat it like
a well-formed f-string. If its part following "IntellijIdeaRulezzz " placeholder
contains special characters, such as "&" in URLs, it can break parsing of
a generated fragment to the extent we are no longer able to recover a string
literal from it (it all gets treated as a single embedded expression).
Forcibly closing a started fragment with "} " seems sufficient to guard against
the subsequent string content.

GitOrigin-RevId: fe682511475b800f013ace5e6e52fca9286cd418
2021-03-16 19:37:02 +00:00

2 lines
107 B
Python

city = "spb"
foo = "https://weather.talkpython.fm/api/weather?city={<caret>&state=&country=&units=imperial"