Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Com_connect with escape !
Hi
I thinked to use the escape attribute with com_connect_text to filter what users are typing.
I used the code like this :
<txp:com_connect_text class="form-control" name="description" label="description" placeholder="Décrivez votre activité" required="0" escape="tag, db"/>
and the result is this below:
<label for="\"description\"" class="\"form-control\"">description</label><br><input class="\"form-control\"" id="\"description\"" name="\"description\"" type="\"text\"" maxlength="\"100\"" form="\"comf31f8fdb253f7a1ce8722449b6bb3d0c\"" placeholder="\"Décrivez" votre="" activité\"="">
It s quite funny no, i presume that the escape attribut cant be used in this case ?
Cheers.
Offline
Re: Com_connect with escape !
Hmmm. Maybe the plugin is escaping its own info and not passing the attribute on to the global attribute handler. Oleg might be able to shed some light on this. Otherwise I’ll try and take a look later.
Edit: actually, escape
isn’t usually used like this anyway. It doesn’t escape the content of what will be passed back from the form. It only escapes what is put on the page, so it’s doing what you asked. It’s just the output seems kinda of odd compared to what you might expect. Maybe there’s an opportunity to be more clever here, although (from memory) I think data is pretty well sanitized when it’s sent. Might be wrong.
Last edited by Bloke (2023-03-29 11:27:23)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Com_connect with escape !
That sounds a bit similar to an issue I had with escape (applied to <txp:meta_description escape="tags" />
in this thread.
In your case the esc
works on txp:com_connect_text
, not on what is in the value
attribute – what the user actually fills in.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Com_connect with escape !
Thanks for explanation.
That confirm what i thinked.
Offline
Pages: 1