Comments (3)
thinking up some implementation details...
example of already done:
Line 318 in 0711308
example of not done:
Line 784 in 0711308
my main idea is to apply URL encoding on user input that will be part of URLs.
maybe by extending a string so that it overwrites the __format__
https://peps.python.org/pep-0498/#code-equivalence
(alternative: wrapper function that is basically f-strings, but it encodes all the user input things)
extending formatter:
https://docs.python.org/3.8/library/string.html#custom-string-formatting
https://peps.python.org/pep-3101/#user-defined-formatting
https://docs.python.org/3.8/library/functions.html#format
https://docs.python.org/3.8/reference/datamodel.html#object.__format__
other links:
https://docs.python.org/3.8/library/functions.html#format
https://docs.python.org/3.8/reference/datamodel.html#object.__format__
https://peps.python.org/pep-0498/#code-equivalence
from synadm.
what about just making the query
function handle the string formatting like str.format
(str
being an actual string object not formatted beforehand, it accepts any args for formatting (except data and other already existing) AND URL encodes user input or whatever)
from synadm.
Sounds like a good idea to fix it in a central location. Please go ahead with a PR, I'm looking forward to reviewing it!
from synadm.
Related Issues (20)
- User modify API requires a redesign HOT 10
- User modify command doesn't show difference in non-interactive output mode
- synadm doesn't work after v0.38 with Click 7.0 HOT 8
- Support new API's to block and unblock rooms
- Suppport the Room State API HOT 1
- Deactivating multiple users at once HOT 4
- Add possibility to pass token via environment variable HOT 8
- Reduce postgresql database size? HOT 2
- Room Id not correct HOT 2
- Improve README: Add detailed prerequisites for matrix-docker-ansible-deploy users HOT 1
- Reintroduce the --servername option to the `media` commands HOT 1
- Unable to delete room HOT 7
- Unable to delete room (status code 500) HOT 4
- synadm stopped functioning on server HOT 4
- Integrate code-style checks into our CI HOT 3
- Catch non-existent rooms on room delete earlier
- Make it possible to change user type
- Investigate why we allow empty string as output format HOT 4
- synadm 0.38 requires Click<8.0,>=7.0, but you have click 8.1.3 which is incompatible. HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synadm.