Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8733
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | BootNic <bootnic.bounce@gmail.com> |
| Newsgroups | comp.lang.php |
| Subject | Re: Thorny string translation issue. |
| Date | Tue, 19 Mar 2013 07:45:20 -0400 |
| Organization | BootNic Party Make your vote count! |
| Lines | 75 |
| Message-ID | <20130319074520.4756c2eb@bootnic.server> (permalink) |
| References | <ki87ne$s68$1@news.albasani.net> <ki8bbd$rrk$1@speranza.aioe.org> <ki9bcd$gu7$1@news.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | multipart/signed; micalg=PGP-SHA1; boundary="Sig_/YzBxaz1RezORe1SjbX1ANIr"; protocol="application/pgp-signature" |
| X-Trace | news.albasani.net +Utf7dWnyJJH0/Q2m/qIIEPGx0dAsfE8UNCbug7WcsKv5ze8gElLGBIAJtf0fz7RNmvua9ocOCvSsYNfOoNCFA== |
| NNTP-Posting-Date | Tue, 19 Mar 2013 11:45:29 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="KFOu+wuYmIyzKIGvKWQISEpuBf7MfHDZKB51LMzzv4KerajkA009vNIshG+LUTd6fGeUdGKykhAIwlEjRZvlH6TZqn4vIxBLiPxT0a88G2NzL/Nv+WE69G0UPW4F97Fr"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Claws Mail |
| X-Mailer | Claws Mail |
| X-Newsreader | Claws-Mail |
| face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAABhQTFRFAAAAACE A/97e562cvVpK5wAAznNS1r1CTn3nxwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA AHdElNRQfbAwEEGy452DVwAAAB1ElEQVQ4y1WUTZLjMAiFfRbjzAGErN5HUc3eEn2Adld6P0m1rj8P/ dlmE4evgIcEmuZiqyn2kTPH6pnqT/1HOed/6xmQWQX2F+BF5gDki1+ymrdmgMVIBa9nzm+6D8DUwC// 5Gy4A8vVLz8vhi5h34C/SU/FDmCzFTRJCt4Ab4kqbBqSagRqZIkQNg1JIin/7qjxFoGwaUgS8c+dnf8 IIhA2rV2SfHI1/eY0xS5J4gls67QdwB0gLhoROYjnkwUFiEArAuXU3OiuRiT96mAvYC0RkZJZkyd2xc /0bZYKFsGhRPIAjv+gr7iUVAA+KNBUjhRQjZgJzUYqeZiOiKSqFKghjB6thqgqTYUIF0+qcHrz2mrgF NPoAydgbk0VSJr5UTvHRW0KNBOzTdTPykOuAnbwf906ULmhNFgCzAXMpbhjtzMOZ6TCAVK9Jq0uR4Qk XABuk/d9ZysSRkQdEeYnUrVROoEIUTv3ycCdr22s0LfKbQBTQttSP4uNTHedxHCAUEGZRPK21HZ9dBB gFcxW7ymdMxnf9mO5gr4f2KjQQJPUN4rutg6ubZLMaWvjEXDaWixVGkAljZfBzgq+q6RwfUtcm+f58p bM61gDmy6AwqP3ca+e/27CGQClLJe3AAAAAElFTkSuQmCC |
| Content-Language | en |
| X-Operating-System | Linux wetBox 3.1.4.7.22 |
| X-Face | "b}DIfR1vz!3oiDs)txy9^EYii7~LSERS*Z,K;N1m!</`1lz);Jwg'a.H,=*"XW}&Tf{?\9jHz7g4!bQn}@f,:jie:KLE|SO=EXc$@-az._9!/C`0vb4!?BMH!O!.-y<Sm9*<?Bp|]/#,y*[|"Cf`yGl5&jI{;w(#kf'XQE8Rj#Y;@!`'GC[|nr$Qrp{',}PxM<!Ok?_^c>_5v~hPEqLdfbyrq- |
| Cancel-Lock | sha1:jA0xwBTREtxiSwEf/m/56oEOk+E= |
| Accept-Language | en |
| Xref | csiph.com comp.lang.php:8733 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
In article <ki9bcd$gu7$1@news.albasani.net>, The Natural Philosopher
<tnp@invalid.invalid> wrote:
>> The Natural Philosopher wrote:
>>> I want the user to enter raw text and embedded HTML into a database.
>>> No trouble with getting it in, but when getting it out, it needs
>>> massaging for display..
>>> Now I cant find a function in the library that will skip html styles
>>> like <b>...</b> or <a...></a> code, and yet still tranlsatee e.g. '>'
>>> to '>' etc etc.
[snip]
> Specifically consider the example
> <b> <= </b>
> where I want to display a bold 'arrow'
[url] http://php.net/manual/en/book.tidy.php [/url]
function tUp($content) {
$config = array(
'indent' => 0,
'output-html' => 1,
'wrap' => 0,
'doctype' => 'strict',
'sort-attributes' => 'alpha',
'output-encoding' => 'utf8',
'char-encoding' => 'utf8'
);
if (extension_loaded("tidy")) {
$tidy = new tidy;
$tidy->parseString($content, $config, 'utf8');
$tidy->cleanRepair();
$body = $tidy->Body();
$content = $body->value;
$content = trim(preg_replace("`<(/)?body>`", "", $content));
}
return $content;
}
print tUp('<b> <= </b>');
[snip]
--
BootNic Tue Mar 19, 2013 07:45 am
The only thing wrong with immortality is that it tends to go on forever.
*Herb Caen*
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Thorny string translation issue. The Natural Philosopher <tnp@invalid.invalid> - 2013-03-18 23:24 +0000
Re: Thorny string translation issue. Christoph Becker <cmbecker69@gmx.de> - 2013-03-19 01:26 +0100
Re: Thorny string translation issue. The Natural Philosopher <tnp@invalid.invalid> - 2013-03-19 09:33 +0000
Re: Thorny string translation issue. BootNic <bootnic.bounce@gmail.com> - 2013-03-19 07:45 -0400
Re: Thorny string translation issue. Christoph Becker <cmbecker69@gmx.de> - 2013-03-20 00:56 +0100
Re: Thorny string translation issue. SwissCheese <swisscheese@cfl.rr.com> - 2013-03-18 20:40 -0400
Re: Thorny string translation issue. The Natural Philosopher <tnp@invalid.invalid> - 2013-03-19 09:38 +0000
Re: Thorny string translation issue. Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-19 09:01 -0400
Re: Thorny string translation issue. "Peter H. Coffin" <hellsop@ninehells.com> - 2013-03-19 07:58 -0500
csiph-web