rfc:escaping_operator
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:escaping_operator [2016/07/30 14:35] – michael-vostrikov | rfc:escaping_operator [2016/07/30 14:50] – michael-vostrikov | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2016-07-14 | * Date: 2016-07-14 | ||
* Author: Michael Vostrikov < | * Author: Michael Vostrikov < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 22: | Line 22: | ||
The problem is that < | The problem is that < | ||
+ | |||
+ | Calling an escaping function manually on every output is the same as calling constructor manually after every ' | ||
+ | <PHP> | ||
+ | (new User)-> | ||
+ | (new Profile)-> | ||
+ | </ | ||
Main argument against such operator is that main problem is in specific context. There are various contexts and each one requires special escaping. But I think this is not required to support all of them. Because - who asks about it?) There are no requests about special operator for json_encode(), | Main argument against such operator is that main problem is in specific context. There are various contexts and each one requires special escaping. But I think this is not required to support all of them. Because - who asks about it?) There are no requests about special operator for json_encode(), | ||
Line 232: | Line 238: | ||
It is easy to use and has small amount of code. | It is easy to use and has small amount of code. | ||
It does not change Zend VM opcodes and does not break any existing code. | It does not change Zend VM opcodes and does not break any existing code. | ||
+ | It can be used as a replacement for standard '<? | ||
Also it will be useful for beginners, which don't know about HTML escaping or forget about it. If there will be special operator for HTML-safe output, beginners will use it, because this is simple. | Also it will be useful for beginners, which don't know about HTML escaping or forget about it. If there will be special operator for HTML-safe output, beginners will use it, because this is simple. | ||
Line 327: | Line 334: | ||
Requires a 2/3 majority\\ | Requires a 2/3 majority\\ | ||
- | Will this tag\operator be useful for many people with the functionality described above? | + | Will this tag/operator be useful for many people with the functionality described above? |
<doodle title=" | <doodle title=" | ||
* Yes | * Yes | ||
Line 340: | Line 347: | ||
* No | * No | ||
</ | </ | ||
- | |||
\\ | \\ | ||
+ | |||
<doodle title=" | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
- | |||
\\ | \\ | ||
+ | |||
<doodle title=" | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
+ | \\ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== |
rfc/escaping_operator.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1