Comments (4)
This issue hasn't been touched for about 2 years but I'd like to elevate this as a bug impacting 3.1. At the very least, HTMLText should override any method that doesn't respect shortcodes with an appropriate replacement.
With the recent work on updating the blog module we should look at improving framework's support for these methods.
from silverstripe-framework.
Will try to address in #5653
from silverstripe-framework.
Context: At the moment the shortcodes are parsed only on HTMLText
objects so a plain text object cannot have shortcodes parsed. HTMLText
parses the shortcodes in the forTemplate
method so it happens at the last possible moment (just before being output in the template) rather than when the value is set
or get
. Each have their advantages and pitfalls.
What is certain is that the shortcodes need to be parsed before any content-type encoding or other manipulation of the value is done.
I think adding the parser to thesetValue
method makes instantiation of a HTMLText
object too expensive, putting it on the getValue
is inefficient (multiple runs) or too fragile to cache.
For now, it looks like @tractorcow's suggestion of overriding each of the functions (XML
, Summary
, etc) and having them parse the codes FIRST and then escape is best.
from silverstripe-framework.
Fixed with #5653 :D
from silverstripe-framework.
Related Issues (20)
- [Bug] TinyMCEConfig breaks when using option `extended_valid_elements` on a custom Config. HOT 25
- Correctly check if values from `ini_get()` are true-like or not HOT 1
- Cache is not correctly shared between CLI and non-CLI HOT 2
- Create new `Environment::getAsBoolean()` method HOT 9
- Add support for paratest HOT 2
- proper return types HOT 4
- Trailing slash also added to external redirects HOT 7
- MoneyField: Move field generation from constructor to custom method HOT 1
- mariadb builds broken HOT 2
- encryptWithUserSettings assumes there is a salt HOT 1
- Form scaffolder should keep original field order HOT 2
- NumericField doesn't valid properly numbers > 1000 with locale fr-Fr HOT 3
- type mismatch HOT 1
- Orphan polymorphic relations get assigned to random DataObject class HOT 3
- Run CanonicalURLMiddleware in dev / test. HOT 2
- Add Nice() to DBField HOT 10
- BUG Eager loading with multiple objects pointing to the same has_one trigger extra db fetch HOT 1
- TimeField should deal better with partial times HOT 1
- Improve phpdoc types HOT 2
- GridField breadcrumbs may use incorrect casting for titles
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 silverstripe-framework.