Nothing wrong with putting them in a text file and attaching them.
That's what I usually do with longer spans of text... but fixing my own typos on text that is attached as a file takes a lot longer than fixing inlined text
Posted by: Dandello Posted on: Mar 24th, 2015 at 5:06pm
Nothing wrong with putting them in a text file and attaching them.
Posted by: Monni Posted on: Mar 24th, 2015 at 4:30pm
And YaBB thoroughly trashes what's inside the code div when converting to e-mail text.
Tomorrow or so I'll look at true html e-mails again.
YaBB trashes what's inside the code div even before converting to e-mail text I'm just going to not post anymore regex patterns because it just don't come out right Too many slashes for YaBB to grok
Posted by: Dandello Posted on: Mar 24th, 2015 at 4:13pm
and so does the one from Regular Expressions Cookbook page 426.
if you leave out ? after \s, it fails on tags like <br/>, but works for <br />...
on the other hand... YaBB chokes on \s when replying, strips off \, it's tricky because it has to match either 1 character or 2 characters because the next rule only matches 3 characters or more as it has to check the start of tag isn't mixed-case.
Posted by: Dandello Posted on: Mar 24th, 2015 at 2:47pm
Sequence (?/...) not recognized in regex; marked by <-- HERE in m/(?isx)<(([a-z]+|[A-Z]+)( ?/ <-- HERE ?|[^a-zA-Z<>][^<>]*[^/<>]/?)|/([a-z]+|[A-Z]+))>/
Code
Sequence (?...) not recognized in regex; marked by <-- HERE in m/(?isx)<(([a-z]+|[A-Z]+)( ? <-- HERE /?|[^a-zA-Z<>][^<>]*[^/<>]/?)|/([a-z]+|[A-Z]+))>/
is set to global, it does work to remove just tags from code like this:
Code (HTML)
<p class="class">>>>test<<<</p><br />
Posted by: Dandello Posted on: Mar 24th, 2015 at 1:35pm
Code
Sequence (?/...) not recognized in regex; marked by <-- HERE in m/(?isx)<(([a-z]+|[A-Z]+)( ?/ <-- HERE ?|[^a-zA-Z<>][^<>]*[^/<>]/?)|/([a-z]+|[A-Z]+))>/
Code
Sequence (?\...) not recognized in regex; marked by <-- HERE in m/(?isx)<(([a-z]+|[A-Z]+)( ?\ <-- HERE /?|[^a-zA-Z<>][^<>]*[^\/<>]\/?)|\/([a-z]+|[A-Z]+))>/
Which means that the issue with autolink urls will break it. Looking at how that section of code evolved I think we can probably remove the
Code
$thismessage =~ s/<.*?>//g;
lines in while leaving the
Code
$thismessage =~ s/[.*?]//g;
that's a few lines above it because the chances of an errant ']' in YaBB is smaller than an errant '>'. (Plus that's what's been used, supposedy successfully for ages, in PM notifications.)
The supposed best solution is to use something like HTML:: Parser to remove the HTML tags.
It is not big trouble to fix both YaBB and HTML tag detection as long as we know which characters can appear at start of tag and which characters can appear at end of tag... This is how I changed the HTML tag detection to detect everything else except comments, because those have very specific restrictions that make the regex very long...
Posted by: Dandello Posted on: Mar 23rd, 2015 at 9:01pm
Which means that the issue with autolink urls will break it. Looking at how that section of code evolved I think we can probably remove the
Code
$thismessage =~ s/<.*?>//g;
lines in while leaving the
Code
$thismessage =~ s/\[.*?\]//g;
that's a few lines above it because the chances of an errant ']' in YaBB is smaller than an errant '>'. (Plus that's what's been used, supposedy successfully for ages, in PM notifications.)
The supposed best solution is to use something like HTML:: Parser to remove the HTML tags.
Posted by: Monni Posted on: Mar 23rd, 2015 at 7:53pm
That's the code everybody uses as an example of what works with very simple html tags. Plus
Code
*?
is a 'lazy' or 'non-greedy' quantifier in Perl. In this case the '>' marks the place it starts looking for matches before the '>', working backwards.
It works when there is none stray < or >... But if there is even one stray >, it doesn't... it also fails miserably if there is no other characters between < and >, which is alternative way to say !=.
http://regexr.com/ is the tool I use to check regex patterns for bugs...