Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2020-07-30 05:56:56
- colak
- Admin
- From: Cyprus
- Registered: 2004-11-20
- Posts: 8,548
- Website
[SOLVED] strip textile
In shortcodes we can have the same attribute/yield serving different contexts. For example I am using <txp:yield name="title" escape="textile" />
which allows h3. my title
but I am also using it as an alt
tag for images on another part of the code where I am calling it without the escape: <txp:yield name="title" />
. Considering that I will not be able to control what textile will be included there, is there a way to just strip textile, or limit it to some basic tags such as bold, italic, headers?
Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.
Offline
#2 2020-07-30 07:32:41
- jakob
- Admin
- From: Germany
- Registered: 2005-01-20
- Posts: 4,087
- Website
Re: [SOLVED] strip textile
colak wrote #324980:
Considering that I will not be able to control what textile will be included there, is there a way to just strip textile, or limit it to some basic tags such as bold, italic, headers?
There’s a lite version of Textile but I don’t think it’s possible to choose that with the escape
tag.
Perhaps you can do it the other way round:
- use
escape="textile"
for your title. - use
escape="textile, tags"
for your alt tag to textile it and then strip out all html tags.
Does that give you what you want?
TXP Builders – finely-crafted code, design and txp
Offline
#3 2020-07-30 07:53:34
- colak
- Admin
- From: Cyprus
- Registered: 2004-11-20
- Posts: 8,548
- Website
Re: [SOLVED] strip textile
That indeed did do it. Thanks so much Julian.
Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.
Offline
Pages: 1