If you want to have a look at what the code actually does to dig out flaws, here is the current version:
sub sanitize_html($%)
{
my ($html,%tags)=@_;
my (@stack,$clean);
my $entity_re=qr/&(?!\#[0-9]+;|\#x[0-9a-fA-F]+;|amp;)/;
while($html=~/(?:([^<]+)|<([^<>]*)>?)/g)
{
my ($text,$tag)=($1,$2);
if($text)
{
$text=~s/$entity_re/&/g;
$text=~s/>/>/g;
$clean.=$text;
}
else
{
if($tag=~m!^\s*(/?)\s*([a-z0-9_:\-\.]+)(?:\s+(.*?)|)\s*(/?)\s*$!si)
{
my ($closing,$name,$args,$implicit)=($1,lc($2),$3,$4);
if($tags{$name})
{
if($closing)
{
if(grep { $_ eq $name } @stack)
{
my $entry;
do {
$entry=pop @stack;
$clean.="</$entry>";
} until $entry eq $name;
}
}
else
{
my %args;
$args=~s/\s/ /sg;
while($args=~/([a-z0-9_:\-\.]+)(?:\s*=\s*(?:'([^']*?)'|"([^"]*?)"|['"]?([^'" ]*))|)/gi)
{
my ($arg,$value)=(lc($1),defined($2)?$2:defined($3)?$3:$4);
$value=$arg unless defined($value);
my $type=$tags{$name}{args}{$arg};
if($type)
{
my $passes=1;
if($type=~/url/i) { $passes=0 unless $value=~/(?:^$protocol_re:|^[^:]+$)/ }
if($type=~/number/i) { $passes=0 unless $value=~/^[0-9]+$/ }
if($passes)
{
$value=~s/$entity_re/&/g;
if($value=~/"/) { $value="'$value'" }
else { $value="\"$value\"" }
$args{$arg}=$value;
}
}
}
my $cleanargs=join " ",map { "$_=$args{$_}" } keys %args;
$implicit="/" if($tags{$name}{empty});
push @stack,$name unless $implicit;
$clean.="<$name";
$clean.=" $cleanargs" if $cleanargs;
$clean.=" $implicit" if $implicit;
$clean.=">";
}
}
}
}
}
my $entry;
while($entry=pop @stack) { $clean.="</$entry>" }
return $clean;
}About the etyomology of "fusianasan":
http://4-ch.net/nihongo/kareha.pl/1102656968/224-
Also, wouldn't making capcodes even more prevalent be considered A Bad Thing®? If anything, the role of capcodes should be minimized or altogether eradicated, in favor of ninja moderation.
Another question: would FUDGE_BLOCKQUOTES be considered deprecated by now, or are there still CSS styles out there that require it?
http://wakaba.c3.cx/sup/kareha.pl/1114201493/l50
Or use some sort of filter to replace them characters with underscores on upload.
This offcourse for files that keep their original filename.
> how about having a third party create extensions for those browsers and freeing up the real estate on the actual page?
What's with this obsession on removing the CSS options? It's a single line, and some of us find it useful.
Real estate? Scroll down.
> Maybe the thread title should be an l50 link?
That's what I've been saying in >>3!
> If anything, the role of capcodes should be minimized or altogether eradicated, in favor of ninja moderation.
It's up to the administration of the site how to use them. I am advocating that if they are used at all (and yes, there are useful instances for this and yes, these are and should be rare) then it would be helpful to be able to differentiate between site owner/admin/supermod/mod/maid/etc
So, as Xee is almost done, and I'm mostly waiting for external contributions, I decided it was time to start working on the Legendary Next Update for Kareha and Wakaba.
Only problem is, it's been a long time, and I've forgotten most of what needs to be done. Most of it is mentioned SOMEWHERE on the board, though. So this is your chance to pipe up with your pet feature request, or if you're feeling really helpful, to dig out some old posts that mention things that need fixing.
Hop to it!
Hey, I just noticed this: where did the admin link go? Or are you working on a separate interface already? :D
First thought: It would eliminate the concept of sageing as a protest entirely.
>>n74,76
It's good for referencing replies, too.
The "always show the first post" behaviour is sort of confusing at first. It seems more intrusive than useful.
Also, wouldn't making capcodes even more prevalent be considered A Bad Thing®? If anything, the role of capcodes should be minimized or altogether eradicated, in favor of ninja moderation.
Another question: would FUDGE_BLOCKQUOTES be considered deprecated by now, or are there still CSS styles out there that require it?
Whoops, sorry. I read "close" instead of "permasage".
Permasage on filesize seems pretty silly, yes.
Oops, here's the screenshot. orz
>>327-328
All of this would be better handled by an external application. I think you are putting way too much work into user gimmicks as it is.
More options means putting more buttons, links, etc. into the interface. I am still bothered by the "More options...", but I am just a text purist (doing my fair share of AA, though) anyway, so meh meh... ( ´・ω・`)
>>> In the end, people actually enjoy the 0ch quirkiness. I know I do. I know about designing good interfaces, but there's something fun about an interface that is a little bit quirky, as long as it doesn't get in your way, and these things don't.
It does get in your way though, I enumerated cases where this is the case (albeit edge cases).
>>>Then just make one post with your name/trip and one with fusianasan and let your ID show up in both.
fusiansan is just intended for rare or special cases anyway, as is the whole subject of identification on anonymous message boards.
You still end up with no way to link the fusianasan post with the name/trip one without IDs enabled (unless the ID method is known and no secret data is used).
>>>It's rarely needed anyway. Also, these things are pretty easy to remember. "sage" and "fusianasan" is all there is, really.
You spelled it fusiansan once.
Also, how is Kahera unrivaled when there are still large sites that are not running it? Shiichan is still on world4ch, Thorn on parts of wakachan for example.
http://wakaba.c3.cx/sup/kareha.pl/1127713568/l50 is also semi-relevant
GDLib for thumbnails: http://wakaba.c3.cx/sup/kareha.pl/1113869490/5
I was browsing through some old threads and now they're all gone. :(
> Is it intentional that thread links without a trailing slash
Uh, I was wondering the same thing. I'm not sure. I guess I should fix that.
> The Title field should go above the Name and Link fields in 2ch mode.
Why should it?
> From every practical standpoint, the current solution in Kareha is a lot more convenient
It's more convenient if you want to start a new thread, but for those who don't it's one more form to have to scroll by.
> Futaba now uses "..." instead of ">>>" to prefix repy blocks.
Any idea why?
the text
c < dcauses a <d> tag to be opened, which is not on the list, and therefore all the text until the next tag will be deleted. a better behavior in this case would be to just convert that < to <. you even ought to do this for
a < btoo, despite the fact that b is a valid tag, because who the hell leaves the closing angle bracket out of their HTML tag?
creating the correct regexes for this is an exercise left to the reader.
The "Entire thread" link on the thread page is missing a "/" at the end.
>>184
If people are going to decide to use custom names for paramaters, then there isn't much you can do about it anyway, or is there?
fusianasan + sage test
I told you to shift-reload!
http://wakaba.c3.cx/sup/kareha.pl/1114201493/l50
Or use some sort of filter to replace them characters with underscores on upload.
This offcourse for files that keep their original filename.