× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



got'a fix my enter key...

Again, in php4 we can parse html with 'htmlspecialchars' where

ENT_QUOTES -  convert both double and single quotes
ENT_COMPAT - convert double-quotes and leave single-quotes alone
ENT_NOQUOTES - leave both double and single quotes unconverted.

example below will print <a href='myPHP' class='href' >hello world</a>

<?php
$as_is = htmlspecialchars("<a href='myPHP' class='href' >hello world</a>",
ENT_QUOTES);
?>

a few other of interest
 htmlentities()
 html_entity_decode()
 get_html_translation_table()

http://us2.php.net/manual/en/function.htmlspecialchars.php


...got'a start my generators ;)

joem


----- Original Message ----- 
From: "Joe Pluta" <joepluta@xxxxxxxxxxxxxxxxx>
To: "'Web Enabling the AS400 / iSeries'" <web400@xxxxxxxxxxxx>
Sent: Thursday, December 02, 2004 10:12 PM
Subject: RE: [WEB400] Question on CGIDEV2


> > From: Brad Stone
> >
> > So, with what I want to do, with eRPGSDK I can do:
> >
> > #loadTemplate('anyfile.ext')
> > #replaceData('<':'&lt;')
> > #writeSection
> >
> > and I'm done.  What I'm doing is showing _why_ in the eRPG
> > SDK I chose to not use delimited tags for replacement
> > fields.
>
> Of course, if you were using Java instead of RPG, you'd include the
> wonderful Open Source htmlparser.jar and simply do this:
>
> out.write(Translate.encode(myOutput));
>
> This would convert ALL non-ISO-8859-1 characters in the String myOutput
> to their correct character entity references at one go (as opposed to
> the multiple calls to #replaceData that you have to do).  But hey, why
> use a power tool on a screw when you can bang it in with that big old
> RPG hammer?
>
> <g>
>
> Joe
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.