Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-23 02:51:13

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

TextileRestricted

Why are we stuck with Textile Restricted for plugins? I know I can use HTML, but it’s a hassle :).

Offline

#2 2008-05-23 08:05:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: TextileRestricted

Complaints of XSS “vulnerability”, IIRC.

Offline

#3 2008-05-23 08:42:12

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: TextileRestricted

Plugin authors can just write a malicious script with raw HTML help though, since JS isn’t disabled. Isn’t it more likely the plugin itself would be dangerous? “Here’s my new plugin, jmd_smile_im_stealing_your_data. Get its sister plugin jmd_db_esplode.” (Or other clever and enticing names.)

Offline

#4 2008-05-25 10:25:54

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: TextileRestricted

Yep. Didn’t make much sense to me either, especially since we’ve got the preview of both before install.

Offline

#5 2008-05-25 18:27:23

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: TextileRestricted

The difference is, that raw HTML help is previewed as source, while Textile help is previewed as rendered markup. So, rendering Textile help with full Textile could expose your site to a malicious script before you had any chance to check its contents. Sadly, it took some time to figure this out ;-)

Offline

#6 2008-05-25 18:43:23

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: TextileRestricted

Couldn’t you just do this for the preview?

$help_source = $textile->TextileThis($help_raw, false, false, true);
$help_source = highlight_string($help_source, true);

Edit: Whoops…forgot to give some context.

Last edited by jm (2008-05-25 18:53:12)

Offline

#7 2008-05-25 18:55:44

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: TextileRestricted

I think that the benefit of a legible help text upon preview outweighs the advantages of full Textile. But that’s certainly a matter of arguments, so what would be the real benefit of full Textile for plugin authors from your POV?

Offline

#8 2008-05-25 18:59:16

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: TextileRestricted

For me, I just need an occasional style attribute. The admin CSS doesn’t play well with headings following tables (too little spacing). Additionally, h2. @code@ needs a smaller font-size.

Edit: When you install a plugin with raw_html (e.g., zem_contact_lang), highlight_string is used. So Textile and HTML plugin help on preview would be equivalent.

Last edited by jm (2008-05-25 19:00:50)

Offline

#9 2008-05-26 13:43:17

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: TextileRestricted

I think that the benefit of a legible help text upon preview outweighs the advantages of full Textile.

When you install a plugin with raw_html (e.g., zem_contact_lang), highlight_string is used. So Textile and HTML plugin help on preview would be equivalent.

As Jon-Michael says. The entire reason we added preview was for security reasons (to let you checkout what the plugin and help would actually be doing), not to let you read the help text before hand.

I’m not sure that “human-readable” help before install is even a benefit, since you can’t do anything with plugin settings or tags until it is installed anyway. If there’s something you should know before install, the onus has always been on the plugin developer to convey it in a different manner.

Offline

#10 2008-05-31 21:45:29

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: TextileRestricted

Ooh! Commit spree today. Could this be considered again?

Offline

#11 2008-05-31 22:04:45

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: TextileRestricted

Not during this commit spree (which is not over yet).

Offline

#12 2008-06-02 02:59:24

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: TextileRestricted

Will a new patch help? :)

Offline

Board footer

Powered by FluxBB