Revision history for Perl extension HTMLObject. 1.00 Sat Jul 22 16:40:27 2000 - original version; created by h2xs 1.19 The initial release of the package to the community through SourceForge. 1.01 Mon Jul 24 16:05:00 2000 - Fixed some major bugs that got overlooked when porting the code over to the new HTMLObject way of things. 1.02 Tue Sep 05 11:42:00 2000 - Added a Generic JavaScript Error Handler and the ability to disable it. Since it provides the ability to email an error message to the author of the program, I made a function that allows the person using the object to specify the email address to use in my generic error handler. Someone can always disable the generic error handler and create their own using it as a template, just give credit thats all. - Continued to flesh out the pod documentation and finished it. - Fixed a minor bug in the tester2.cgi sample script where the GetCookie call was not prefixed with HTMLObject:: so it was not returning a value. 1.03 Wed Oct 11 15:05:00 2000 - Added encode_string and decode_string functions to the Base and GetCookie modules to facilitate working with URI encoded strings easier. - Fleshed out the JavaScript error Handler and made it provide more info and the ability to gather more info from the user so that it is more helpfull. 1.04 Thur Oct 19 17:25:00 2000 - Added the language_code to Language Names and Charset Encoding hashes to the Base module. - Created the functions set_language_encoding, get_language and get_char_encoding to set and get the language and charset encoding values to support internationalization in the HTMLObject. Modified the get_content_type function to return the charset encoding string if this is a text/html document. - Modified Base, Normal and FrameSet modules to set the lang="" tag in the tag. - Created the functions get_language_name and lookup_language_name to return the current language code in english or to lookup a language code and return the english version of the language. - Created the function lookup_char_encoding to return the possible charset encodings valid for the specified language code. Defaults to looking up english if nothing is given. - Created test program in examples to test the Internationalization support code. Currently supports English and pseudo Basque. 1.05 Fri Oct 20 15:53:00 2000 - Added set_javascript_error_handler_window, get_javascript_error_handler_window, get_javascript_error_handler_email, is_javascript_error_handler_enabled to help make working with the JavaScript Error Handler easier. - Cleaned up tester.cgi and tester2.cgi to make testing the JavaScript Error Handler easier. 1.06 Wed Nov 10 10:00:00 2000 - Added session.cgi to the examples directory. This script uses the Apache::Session perl module to provide session persistance. This is a sample program designed to allow us to test how it works and make it interface into the HTMLObject way of doing things. - Created HTMLObject::ReadCookie class to make working with cookies easier. - Created tester3.cgi which uses the ReadCookie class. tester.cgi will call tester3.cgi for one of the windows. This allows people to compare and contrast the different ways of reading cookies. 1.07 Tue Dec 05 16:30:00 2000 - Made the hashes for language code lookup be part of the object for easier access in calling programs. - Added didErrorOccur so that the spelling is correct. Left the old method so that current programs aren't broken immediately. - Fixed the encode_string routines array and hashes so that it works. 1.08 Wed Feb 21 15:31:00 2001 - Added encodeFormData method to convert &, space, etc to the HTML encodings to make Form data be 100% valid. 1.09 Sat Feb 24 14:10:00 2001 - Making all methods of form method_name have methodName counterparts. All parameters to the methods will also have the new format and all variables used in the system will be converted. - This is the last 1.x version before the 2.x series is started. 2.00 will introduce the WAP module and eventually a XHTML module will be created. - All examples will be updated to use the new methods and variable names. - Fixed some minor bugs in error handling in several routines. Nothing major. - Made the %Cookies hash be %cookies. This will break any code that goes directly to the hash for the cookies. This is only in the ReadCookie library. The GetCookie library was updated, but will not be maintained in the future. It will be removed as of 2.00. - Removed the documentation.html file from the distribution as it only covered the old style methods and is now replaced with the POD documentation. 2.00 Mon Feb 26 15:20:00 2001 - Adding HTMLObject::WAP - which allows us to create HDML or WML documents. - Removed all old style methods and the ReadCookie module. 2.01 Tue Jun 05 10:00:00 2001 - Added support to Base and Normal to allow them to work in a non-Buffering mode. This way you can generate all JavaScript, cookies, MetaTags, etc. and output them and then just work on the body when doing a long data process without having the browser timeout. The only valid functions after calling startDisplaying() are error routines, endDisplaying and print. print may be called multiple times, while endDisplaying is only to be used when you are done outputing your content and want to send the \n tags for the browser. - Adding module Template which will accept an html file to do substitutions on for your dynamic content. This will allow you to have someone who does not know programming to design what your site/application will look like and as long as they have the needed tags embedded will still allow you to dynamically generate javaScript, MetaTags, cookies and parts of the body. This obviously will not be able to work in a non-buffering way at the moment, but if anyone can present a workable solution then I will evalute it for future inclusion. - Note: RPMs will only be generated for RedHat 7.x boxes as I no longer have a RH 6.2 box around. If anyone wants to create the RH 6.x rpms I will include them at the SourceForge site. 2.02 Fri Jun 08 10:30:00 2001 - Changed Template to be derived from Normal instead of Base. Overloaded all Normal module methods to provide error checking and then call the Super classes version to do the work. - Enhanced the displayError method to display the HTML file that was being used as the template file. - Made the Normal Module only call setTitle in method new() if it was defining an instance of itself (otherwise when Template was being instantiated the version of setTitle in Template was being called which would blow an error because the system didn't know yet if it was valid to set a Title or not. 2.03 Tue Jun 12 11:30:00 2001 - Implemented some validity checks in Template module to make sure the is defined when is defined. - Updated the POD documentation to include all Base methods that have been overloaded and to document the tag that is required to make the method be valid to work with. 2.04 Tue Jun 12 12:30:00 2001 - Updated examples script tester.cgi to use tester3.cgi instead of tester2.cgi so that the cookie library is properly used. - Adding option to substitute method to allow the tag/value to be globally replaced instead of just the first instance. - Making the lang tag be a global replace so that you can embed it in your links and not have to worry about having to manually update it yourself later. This will only output the language code being used (ex: en). 2.05 Mon Jun 18 19:00:00 2001 - Added some checks in the encode methods so that we don't try to encode an empty string. - Did some warning message cleanups. 2.06 Fri Jul 6 10:15:00 2001 - Added cgi-lib.pl script as CGILib.pm to the Module so it is now available as HTMLObject::CGILib. Everything is still the same as far as how it works. - Adding CCS helper functions. - Updated Template module to use the new Style Sheet method and changed the to be . 2.07 Mon Jul 16 2001 - Specified that the Project License is the Perl Artistic License. 2.08 Mon Jul 23 2001 - Improving the JavaScript Error Handler to be able to output both Version 4 and Version 5 compatible methods or just one or the other. Adding support to the Version 5 method to display the contents of the error object if the user wants that. This will mainly be for use in a try/catch block. 2.09 Mon Aug 06 2001 - Made all script tags have the type="text/javascript" set so that we are 100% compliant with the standards. - Added the missing optional args to the setLink method and make the title not be a required item. - Moved the setLink, setBase, setStyleEntry and setLinkDecorations methods and all supporting data structures, display methods and POD documentation from Normal.pm to Base.pm to make non JavaScript documents more powerfull. 2.10 Fri Sep 21 2001 - Fixed the cgi_lib' issue when it should have been HTMLObject::CGILib:: so that you can properly set the variables he provides to indicate how much data can be sent in, if you want to allow file uploads, etc. - Modified Template to be able to handle the storage of tag content via print, read and delete so that you don't have to build up a string and then call substitute. The display() method now does the substitution for you if you use the print method. read allows you to retrieve what you have printed while delete allows you to forget what you had printed. 2.11 Sat Oct 06 2001 - Added printTag, readTag and deleteTag methods to Base and propagated them up to Normal and Template. Fixed the implementation in Template for print, read and delete to revert them back to version 2.09 semantics. - Added debug support code to display and displayError methods so that the output that display would generate is just returned in a string with all the special characters encoded and tabs, \n's, etc replaced with   and
\n's so that the output looks like it would if viewed through the browser (almost). This is to help debug your output by being able to add debug => 1 to displayError calls so that the HTML that would have been generated before the error is added to the end of the error document. 2.12 Mon Oct 08 2001 - First attempt at fixing the space adding problem with textarea's. 2.13 Mon Oct 15 2001 - Removing the error checking that requires the tag to exist for printTag. - Fixed the textarea and pre tag indentation issues. - Fully fixed the tag substitution for Base, Normal and Template modules. - Added formDecodeString and formProtectString methods in Base. - Removed the \$ encode/decode => \$\$ since netscape doesn't display it as a single $ but as \$\$. - Removed the ' encode/decode => ' since netscape doesn't understand it and it apparently is not in the HTML4.x standard. Mozilla works with it. 2.14 Tue Nov 06 2001 - Removed the content type checking that limited the content types we could create. - fixed up all checks for text/html in the Base, Normal and Template modules to enforce that the content type string only consists of text/html. 2.15 Tue Nov 20 2001 - Fixed the \ escape issue in ReadCookie.pm. - Added support to specify which version of HTML to use and whether or not to use the strict or loose DTD for non-framesets. 2.16 Sat Sep 21 2002 - Fixed the bug where a would be generated on endDisplaying() regardless of the content-Type value. - Added the ability to setStyleEntry to specify a string in the proper format instead of specifying the hash. This will make it easier on programmers. - Added the ability to specify we want to generate an XHTML document. Use setHTMLInfo to enable xhtml support. By default xhtml support is disabled. - In accordance to the XHTML support, all generated
->
(always), and any become , but only if xhtml is enabled. - Updated FrameSet::displayError() to handle the debug attribute and it now calls it's parent classes displayError() method to do the work. Made FrameSet::display() either return the output string or print it based upon the value of debug that you pass it. This way it works properly when called by Base::displayError() as part of the OO way things work. - Added the necessary DocType definitions for XHTML documents. 2.17 Mon Nov 03 2003 - Debianized - Adding methods to the Base module to allow the user to create html tags without having to know all the syntax, etc. - Fixed up and improved the JavaScript Error Handler code. - Finished making the core modules xhtml aware (Template module). 2.18 Tue Feb 24 2004 - Cleaning up the api to allow those methods that are expecting only a single argument to either take it as a named parameter or a simple string. - Inlining POD documentation in Base.pm. - Made the JavaScript Error Handler default to off until the user specifies the e-mail address to use. Closes FR#907727 - Fleshed out the makeValidHTML() method. The only things it doesn't handle yet are tags that historically weren't closed and now should be (option, li, lo, td, th, tr - Added the HTMLObject::Form module to help make HTML Forms easier. - Moved the color and date pickers along with the other javascript libraries from the Portal to allow sharing the functionality with non-Portal apps. - Added support to the CGILib module to handle "Human Readable" file upload sizes. M,K,B extensions. Ex: 4M, 300K, 1024B or just a number. - Optimized the formEncode, formProtect and uriEncode methods to try to do the least number of regular expression loops as possible and to calculate the uri encoded values instead of looking them up. Much easier to extend. 2.19 Thu Jun 03 2004 - Adding the untaint_all_constrainsts option to the validate() methods profile handling so that inputs of 0 do not get flagged as invalid, when the validation code says it is valid! - Fleshed out the POD documentation in regards to HTML Tag support similiar to how the CGI library supports generating html tags. - Added -ReadOnlyDisplayType for -Type = select|multi-select, so the developer can customize the way the data is displayed when -ReadOnlyMode = text. 2.20 Fri Jun 25 2004 - Fixed the -ReadOnlyDisplayType support for the -Type = select case. - Cleaned up the form.cgi example to only do the display code once. 2.21 Thu 2004-07-01 - Changed the default focus from head to body to help prevent invalid documents from being generated by accident. - Added the deleteErrorsEntry() method to the Form module to allow the developer to remove entries from the _errors_ hash without having to know the structure of the hash. 2.22 Fri 2004-07-02 - Added pretty printing characteristics to the htmlTag() method so we generate structured html tags rather than everything on a single line. - Updated the HTMLObject::Form::validate() code to take into account the Data::FormValidator->valid() method returns an array when in array context. 2.23 Mon 2004-08-30 - Modifying the encode/decode methods to be callable as functions or as methods which will mean we don't always have to instantiate HTMLObject::Base modules everytime we need to uri encode something. - Added support to HTMLObject::Form for: o javascript/javascriptIncludes being passed to generate(). o created a new -Type = select-picker which allows the user to manage 2 sets of entries where the left select box shows the "Assigned" entries and the right select box shows the "UnAssigned" entries. o created helper methods to make the -Options hashrefs for -Type = select or radio from DBI statement handles (sth), arrayrefs of arrayrefs, arrayrefs of hashrefs, and/or hashrefs. The data format is customizable by specifying a handler subroutine to handle the data you give the method, if the incoming data is not going to fit the default scenario for the method in question. o all replacements are now global in nature so you can have multiple indicators, etc. that get replaced throughout your form. o Added a bunch of shortcuts to make generating the needed #Y=x# fields easier. o -onload and -onunload attributes per form item to allow JavaScript code to be generated that is executed in the onload or onunload handler. - Added support to the HTMLObject::Normal->print() method for the onload and onunload arguments to cause onload/onunload code to be generated. - Added support to the HTMLObject::Base->print() method for the style/css, link, cookie and metaTag arguments to allow the user to modify those data structures. Updated POD documentation to reflect all the new arguments and how they should work. - Added displayDTD flag via the setHTMLInfo/getHTMLInfo which allows you to not display the DTD header when displaying the document. It defaults to on so the DTD is displayed for backwards compatibility reasons. - Improved the displayError() output so that it is more obvious that we are displaying an error message from the HTMLObject. 2.24 Fri 2004-10-01 - Added the functionality to formEncodeString()/formEncode() to allow you to specify tags that should not be encoded or to pick from a pre-defined set of tags to not encode. - Updated the generatePickerCode() to make sure the phrase is formEncode()'ed to protect against XSS vulnerabilities. - Updated HTMLObject::Form->generate() to formEncode() the -Label to protect against XSS vulnerabilities. - Added month/day validation checks to the formatISODate() javascript code. - Added the error() method to HTMLObject::Form to replace didErrorOccur() and setError()/postfixError(). - Updated the radio API to use the same -Options entries as the select/multi-select boxes do. Put in a DEPRECATED warning to get early adopters to fix their code before it just breaks. - Updated POD documentation to be clearer in regards to setFocus() and setOnload(). - Made the setOnload() function take a single parameter as the code value. - ** API BREAKAGE ALERT ** The javascript onload code no longer generates a function that supports user specified parameters and options! setOnload() and the new onload() functions only work with the code that is put in the body of the generated doOnLoad() function. If you were using the parameters/options feature, just build a function that takes them and call it with your options in the onload() method. The same thing was done with the setOnunload() and the new onunload() methods. - Created new optionsBuilder() method to help make