Gerald Richter wrote:
Try $self -> AddTagBlock ('h2', undef, ['color'], undef, { perlcode => q{ { local $escmode = 0; _ep_rp(%$x%, "<img src="" . $epreq -> Escape (%&'color%, 2) . "&text=" . $epreq -> Escape (XML::Embperl::DOM::Node::iChildsText(%$n%), 2) . "\">"); }} }) ; Excellent!!! It works! One more problem: the escaping ( initial local $escmode = 0 ) stops workins after first use and only is restore when some Embperl processed HTML is found eg <h2 color="#F00">111</h2><br> <h2>222</h2><br> <h2>333</h2><br> <ul></ul> <h2>444</h2><br> <h2>555</h2><br> results in <img src="/img/h2.png?color=%23F00&text=111"><br> <img src="" class="entity">quot;/img/h2.png?color=&text=222"><br> <img src="" class="entity">quot;/img/h2.png?color=&text=333"><br> <ul></ul> <img src="/img/h2.png?color=&text=444"><br> <img src="" class="entity">quot;/img/h2.png?color=&text=555"><br> One more help, please... Thank you very much. - Robert 3) it doesn't output outmost <h2> which is usefull for CSS styling, how can I add it so it down't go into endless loop?I don't understand the last question, could you give an example? I had problem when <h2> tag was replaced by <h2><stuff> and I supposed it dumps core because of some endless loop, but it was an unrelated problem. My mistake. |
- RE: Redefining common tags? (partial solution) Gerald Richter
- Re: Redefining common tags? (partial solution) RobertCZ
- RE: Redefining common tags? (partial solution) Gerald Richter
- Re: Redefining common tags? (partial solution) RobertCZ
- RE: Redefining common tags? (partial solut... Gerald Richter
- Re: Redefining common tags? (partial ... RobertCZ
- RE: Redefining common tags? (part... Gerald Richter
- Re: Redefining common tags? (... RobertCZ
- RE: Redefining common tags? (... Gerald Richter
- Re: Redefining common tags? (... RobertCZ
- RE: Redefining common tags? (... Gerald Richter
- Re: Redefining common tags? (... RobertCZ