mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
2335c074b3
Shortcodes have traditionally had a problem that they are inside <p> tags, but generate block level elements. This breaks HTML compliance. This makes the shortcode parser now mutate the DOM based on the "class" attribute on the shortcode to insert the generated block level element at the right place in the DOM - for "left" and "right" elements it puts them just before the block level element they are inside - for "leftAlone" and "center" elements it splits the DOM around the shortcode. The trade off is that shortcodes are no longer "text level" features. They need knowledge of the HTML they are in to perform this transformation, so they can only be used in (valid) HTML
23 lines
1.6 KiB
Plaintext
23 lines
1.6 KiB
Plaintext
Copyright (c) 2006-2011 The Authors
|
|
|
|
Contributors:
|
|
James Graham - jg307@cam.ac.uk
|
|
Anne van Kesteren - annevankesteren@gmail.com
|
|
Lachlan Hunt - lachlan.hunt@lachy.id.au
|
|
Matt McDonald - kanashii@kanashii.ca
|
|
Sam Ruby - rubys@intertwingly.net
|
|
Ian Hickson (Google) - ian@hixie.ch
|
|
Thomas Broyer - t.broyer@ltgt.net
|
|
Jacques Distler - distler@golem.ph.utexas.edu
|
|
Henri Sivonen - hsivonen@iki.fi
|
|
Adam Barth - abarth@webkit.org
|
|
Eric Seidel - eric@webkit.org
|
|
The Mozilla Foundation (contributions from Henri Sivonen since 2008)
|
|
David Flanagan (Mozilla) - dflanagan@mozilla.com
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|