On Monday, June 12, 2006, at 11:58 pm, Jacob Haller wrote:
Really? I tried it before I responded. Starting with:
<p>£3</p>
I did Markup -> Utilities -> Translate text to HTML (HTML entities
checked, use name, ignore < and >, encode Unicode characters,
selection only. I selected <p>£3</p> and the result is:
<p>£3</p>
What exactly isn't working about this?
It does what you say, but it doesn't answer his question, which is
more general. (I don't think there is a general answer to his
question -- for instance I don't think you can selectively convert
non-tags to upper case, at least not without using a regular
expression -- but I may be wrong.)
yes that's right, thanks, it's the general case i was hoping for, not
specifically conversion to html entities.
don't think it'd be that hard to carry out either (in code); if you've
got the capability to reliably strip out html from text (which i don't
think is that hard -- is that something bbedit can do already? must be)
all you've got to do further to that is instead of stripping it out,
mask off the html, allow the text parts "showing through" to expand and
shrink in length (and importantly remember their starts and ends -- so
basically treat all the little parts of text as separate files),
perform process(es) on text parts, then put back the html parts -- what
a great new feature of bbedit?! and not hard; i thought it was to start
with but it's not. you just have to treat all the text (having removed
the html temporally) as lots of little bits of text -- never join it
all together which is essentially what the basic strip tags statement
in php does. you could even have the option to include or not include
things like the xhtml text that are say class values -- which are kind
of in between xhtml and english (or whatever human language you're
writing in)
I did Markup -> Utilities -> Translate text to HTML (HTML entities
checked, use name, ignore < and >, encode Unicode characters,
selection only. I selected <p>£3</p> and the result is:
<p>£3</p>
will that work reliably for a whole html or xhtml document? if the
document is correct html apart from it's lack of correctly encoded
text? i suppose it would right? as xhtml is entirely within <>'s (isn't
it?), so they'd be no danger of that process mangling perfectly ok
xhtml? i suppose the one problem would be when you've have <'s or >'s
in the text that should be encoded but it's probably a bit much to
expect software to distinguish between <>'s that are in text and <>'s
that are part of html possibly.
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>