Loading ...
Sorry, an error occurred while loading the content.

1609Re: HTMLEn/Decode replacements

Expand Messages
  • Josh Chamas
    Mar 2 5:00 PM
    • 0 Attachment
      John Drago wrote:
      > Hello,
      >
      > I needed to make some changes to the Apache::ASP::Server::HTMLEn/Decode
      > subroutines so they would suit a particular purpose in a project I am
      > working on.
      >
      > I am putting this code out here for what it's worth. These work as
      > drop-in replacements for the subroutines by the same name in
      > Apache::ASP::Server.pm
      >

      Hi John,

      In considering adding this to the Apache::ASP code, I am wondering
      under what circumstances you would want to do this? For possible inclusion,
      this might be something like HTMLEncodeEntities() or some such...

      Also, if it does not make it in, you might consider subclassing Apache::ASP::Server,
      so you do not have to modify the base class itself. As an optimization for
      large conversions, you might lose the while() and:

      # not tested!
      $$toEncode =~ s/[^A-Za-z0-9\~`!@\#\$%\^&\*\(\)\-_\+\=\{\}\[\]\:;'"\<,\>\.\?\\\/\s]/"&#" . ord($char) . ";"/egs;

      Regards,

      Josh

      ________________________________________________________________________
      Josh Chamas, Founder | NodeWorks - http://www.nodeworks.com
      Chamas Enterprises Inc. | NodeWorks Directory - http://dir.nodeworks.com
      http://www.chamas.com | Apache::ASP - http://www.apache-asp.org



      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Show all 3 messages in this topic