Le 25/01/2017 13:17, Joe Mistachkin a écrit :
BohwaZ wrote:
Hey, the HTML rendering of wiki pages using fossil syntax is currently
broken.
Can you specify what it's doing incorrectly?
FossilWiki-formatted pages were treated as text/plain.
So for example links were not transformed into HTML tags, but left as
is, eg. "[Wiki link]".
I can see why my fix worked, looking at the change that created the
problem:
https://www.fossil-scm.org/index.html/fdiff?sbs=1&v1=5928a25dc68772bc&v2=492aa680b85f51df
And the function definition in wiki.c:
/*
** Only allow certain mimetypes through.
** All others become "text/x-fossil-wiki"
*/
const char *wiki_filter_mimetypes(const char *zMimetype){
if( zMimetype!=0 ){
int i;
for(i=0; i<count(azStyles); i+=3){
if( fossil_strcmp(zMimetype,azStyles[i+2])==0 ){
return azStyles[i];
}
}
if( fossil_strcmp(zMimetype, "text/x-markdown")==0
|| fossil_strcmp(zMimetype, "text/plain")==0 ){
return zMimetype;
}
}
return "text/x-fossil-wiki";
}
So in fact the default should be "text/x-fossil-wiki" and not
"text/plain" when zMimetype == 0. I just checked and my wiki pages do
have pWiki->zMimetype set to 0. So my fossil wiki formatted pages were
treated as text/plain.
I don't know why you did that change though? but I think it should be
reverted to get back the correct behaviour.
Regards.
_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev