I was challenged again to re-examine the forms markup rule to deal
with the problem of ] in a form value (to prevent escaping from being
necessary). I came up with good success:

MarkUp('form', 'inputs',
'/(\n?)\[(form|session|text|check|radio|password|hidden|image|select|option|box|file|button|submit|reset|link)((
([-_a-z0-9]+=)?([-_a-z0-9]+\[\]|\"[^\"]*\"|\'[^\']*\'|[^\]
]+))*)?\]/ie', 'BOLTMinputs("$2", "$3", "$1")');  // [form]

Basically it allows you to do

[session field "]"]

with no problem. As long as your closing ] is in ' or " marks.  I did
have one problem with funny displays for buttons like the following,
when there were two on a line:

[submit name=boltsubmit[] value='>>PREVIEW<<'] [submit
name=boltsubmit[] value='>>SAVE<<']

But the problem was a deficiency in the translate markup.  Both of
these rules should have the "ungreedy" U in the flags:

if (BOLTconfig('BOLTlanguage') != '') MarkUp('func', 'translate',
'/>>(.+)(&lt;&lt;|<<)/meU', 'BOLTtranslate("$1", "")'); //
>>translated text<<
else MarkUp('func', 'translate', '/>>(.+)(&lt;&lt;|<<)/meU', '"$1"');
// >>translated text<<

Anyway, if anyone cares to upgrade their markups.php page and help me
to spot problems I'd appreciate it. I think this is a much better way
of doing things. Next release...

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to