You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does it not get parsed here? I thought parse was recursive? Maybe it isn't...
Do you have an example of a select/option form that breaks because it needs parsing? I can then use it to test the functionality and fix it if necessary.
I think, that's the problem. The txpspecialchars() in zem_contact_option is called first and all resulting $thing/$label - as <txp:category title="1" /> in my example - will be txpspecialchars()'d in the first. So there is only a <txp:category title="1" /> to be parsed.
So is the solution to parse($thing) in zem_contact_option somewhere near the top of the function, before $atts is extracted so that the $match gets set correctly? e.g.:
function zem_contact_option($atts, $thing = null)
{
static $options;
static $match;
if ($thing !== null) {
$thing = parse($thing);
}
if ($atts === null) {
...
Not tested yet, but this will only parse $thing and not $label or $value, isn't it?
The resulting html option inner text (option label) can be all other $atts parameters as $label and $value and $thing (see Line1173).
Activity
Bloke commentedon Mar 9, 2017
Does it not get parsed here? I thought parse was recursive? Maybe it isn't...
Do you have an example of a select/option form that breaks because it needs parsing? I can then use it to test the functionality and fix it if necessary.
trenc commentedon Mar 10, 2017
Hm, weird thing. Here is my example:
As in the code you mentioned it should be parsed. But only the wrapped
zem_contact_optionis parsed toThe inner $thing is only handled by
txpspecialchars()from thezem_contact_optiontag. I've to explicitly parse the$thingin Line 1172 and L1173.Btw. How do you link to an line number here in GitHub markdown without linking to an issue (#L)?
trenc commentedon Mar 15, 2017
I think, that's the problem. The txpspecialchars() in zem_contact_option is called first and all resulting $thing/$label - as
<txp:category title="1" />in my example - will be txpspecialchars()'d in the first. So there is only a<txp:category title="1" />to be parsed.Bloke commentedon Mar 15, 2017
So is the solution to
parse($thing)in zem_contact_option somewhere near the top of the function, before$attsis extracted so that the$matchgets set correctly? e.g.:Or will that introduce other oddness?
trenc commentedon Mar 17, 2017
Not tested yet, but this will only parse
$thingand not$labelor$value, isn't it?The resulting html option inner text (option label) can be all other
$attsparameters as$labeland$valueand$thing(see Line1173).