I am still recovering from the 26th installment of the local festival "Day of the Life Song". Ten hours of drinking and singing, so blogging comes kind of natural at this time. :-)
For lovers of the Day of the Life Song, a photo that I saw on some CTO's feed:
Der Keyboard Superstar live in action!
Off topic: terrible translation "life song" for "levenslied". I tried "tear jerker" but that is not making it any better. Suggestions for good translations are welcome.
In the last few weeks the ampersand (the character '&') has been
trying to catch my attention. As you may know, the page you are looking
at is defined in HTML. In HTML, the '&' is used as escape character
for HTML-entities, much like the backslash (\) in Java strings or the
single quote (') in SQL strings. Whenever you encounter strange things
in HTML, you are supposed to escape them to their entities. If you don't Bad Things (tm) might happen (and in fact they do when exporting XML output for RSS readers)!
Below are some escaping examples:
String test = "Look mom, a backslash (\\)"; // Java
SELECT 'Look mom, a single quote ('')' -- SQL
<b>Look mom, an ampersand (&)</b> <!-- HTML -->
Enters the content. In particular: URLs. Below are a few examples taken from this site:
http://www.gxdeveloperweb.com/Blogs.htm http://www.gxdeveloperweb.com/Forums/Forum-WCB-Java-Development.htm?fc=4-160&forum=4&message=160
As you can see, the latter URL contains ampersands. While a URL does not need to be escaped in the address bar of your browser, it does need to be escaped in the HTML source code that builds a link for you. The source for that last URL should read:
<a href="/Forums/Forum-WCB-Java-Development.htm?fc=4-160&forum=4&message=160">link</a>
Which it actually does! I must confess I am amazed, because not many people are true escape artists. This is fuelled by browsers that allow you to be sloppy.
Yay! GX WebManager correctly escapes internal links! External links it does not touch, though. You will have to escape those ampersands manually.
Not all shines, though. The HTML validator still detects plenty of unescaped ampersands in the HTML source of this website, probably the result of mistakes in the design JSP files. Which only goes to illustrate that it is good to check, check, and doublecheck again!
Keep an eye out for them ampersands... Till next time!
Greetings,
Patrick
Patrick Atoon has gained nuff respect as one of the most experienced web architects in the GX Webmanager community or even the global hip hop community for that matter.
Read all Patricks blog entries
Other blog entries: