These are my very first attempts at producing patches for LJ, and I'm not sure if I'm going about this the right way or not. Am I supposed to e-mail this to somebody? *looks lost*
I'm learning here, and just trying to help out. I would appreciate any and all feedback.
To consider:
- I have no idea what I'm doing with CVS. I only just now figured out how to generate these diffs (and I'm not sure if I did them right).
- This code is untested. I'd appreciate it if somebody would check it out and see if it will do what it's supposed to do.
cleanhtml.pl Patch
Reference
Introduction
<DIV>
and <SPAN>
are not currently allowed in comments (responses). The issue of why was brought up, and nobody seemed to be able to come up with an answer. If there are no objections, I'd like support for them to be added.
What I did
- Added
div
andspan
to@comment_close
What it's supposed to do
- Allow
<DIV>
and<SPAN>
elements to be used in comments (responses).
Patch
talkpost_do.bml Patch
References
Introduction
When a comment is made to a post that is marked pre-formatted, talkpost_do.bml currently runs the post through the HTML cleaner anyway before quoting it in the comment notification e-mail. This patch is supposed to fix that (although it definitely needs testing).
What I did
- Added a line to check
$logprops{'opt_preformatted'}
to see if the original post was marked pre-formatted. - Sent the result as an argument
LJ::CleanHTML::clean_comment()
to properly format the post.
What it's supposed to do
- Properly format the quoted original post in a comment notification e-mail if (or if not) the original post is marked pre-formatted.