Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
Undef attribute values exclude the attribute, this is useful in many
cases, e.g.
input type => 'checkbox', checked => $checked ? '' : undef;
Likewise, and in combination with undef attributes, concat attributes
are useful for dynamically setting classes:
div '+class' => 'box', '+class' => $important ? 'warn' : undef;
The '+' prefix is invalid in XML and HTML, so can be safely used for
this context. Other prefixes can be added later, too. I had thought of
using a '?' prefix for boolean attributes, but using '' and undef kinda
works well enough.
|
|
|
|
|
|
|
|
|
|
|
|
I've tried various things to make TUWF::XML faster, but so far this is
the only change that actually has some effect. Can shave off about 1% to
3% of the page load time for pages that are heavy on TUWF::XML usage.
And '>' totally doesn't need to be escaped.
|
|
I think I should go over the entire tag list again before the next
stable release...
|
|
Apparently I wasn't using a full html5 reference. Or rather, html5 is
still quite a living standard.
|
|
Html;
Head sub {
End; # this would previously generate </html>, now it's an error.
};
|
|
Fixes an omission of 35776908b286b3f31a7d14f745f5ec6641c97fd6
|
|
Read: "I've no clue which style is best and everyone has their own
opinions, so let's just support everything!"
This is a breaking change for the :html5 group, but that group was only
added recently and did not yet make it into a stable TUWF release, so
there's little actual breakage.
|
|
|
|
There are many of them, and some may clash with commonly exported
functions by other modules. So instead of ucfirst()ing only a few
special ones, I decided to be consistend and ucfirst everything. It's
slightly uglier, though. :(
|
|
This is kind-of a breaking change, but the HTML5 doctype is more
compatible than xhtml1-strict.
This change is a bit silly when everything else in TUWF::XML is still
built for XHTML rather than HTML5, but I'll add some proper HTML5
support in a bit.
|
|
|
|
|
|
|
|
|
|
Makes CPAN users happy
|
|
|
|
|
|
|
|
xml_escape(), as the name suggests, escapes XML data, which would
exclude converting \n to <br /> tags.
html_escape() is the same as the previous xml_escape(), as that
behaviour *is* quite useful in certain cases.
This change also affects all code that assumes tag() values are
html_escape()'d. If it turns out that VNDB had a lot of instances where
I did make that assumption, I'll probably add a
reference-to-scalar-uses-html_escape thing... But it may be nice to
reserve the scalarref for other use, like for lit().
|
|
To replace the not-really-nice way of assinging to $TUWF::XML::OBJ.
|
|
end() will croak when the tags do not match, or when there's nothing
more to close.
|
|
|
|
This should make debugging a lot easier
|
|
Will write an example for that later on.
|
|
This allows TUWF::XML to be imported from outside of TUWF. (Though it
cannot be used yet since it still requires $TUWF::OBJ to be present)
|
|
I'll create new examples while making some improvements to the
framework.
|