|
Revision 994, 1.2 KB
(checked in by bradfitz, 11 years ago)
|
|
<lj user=avva>:
This patch does two things:
1. Correctly encodes Subject: fields in emails as per RFC2047.
Note it uses MIME::Words , which should be on all our servers (I think
it's part of the standard distribution, but it's better to check).
2. Inserts a meta tag with encoding information in the beginning of
the HTML part of the email (some mail readers aren't smart enough to
apply the Content-type: information already there in the MIME header
to HTML attachments, so this gives them a clue).
Tested.
<lj user=bradfitz>:
the lj-bml-init/INSTALL changes
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | # |
|---|
| 3 | |
|---|
| 4 | require 'ljconfig.pl'; |
|---|
| 5 | |
|---|
| 6 | BML::register_block("DOMAIN", "S", $LJ::DOMAIN); |
|---|
| 7 | BML::register_block("IMGPREFIX", "S", $LJ::IMGPREFIX); |
|---|
| 8 | BML::register_block("SITEROOT", "S", $LJ::SITEROOT); |
|---|
| 9 | BML::register_block("SITENAME", "S", $LJ::SITENAME); |
|---|
| 10 | BML::register_block("ADMIN_EMAIL", "S", $LJ::ADMIN_EMAIL); |
|---|
| 11 | BML::register_block("SUPPORT_EMAIL", "S", $LJ::SUPPORT_EMAIL); |
|---|
| 12 | |
|---|
| 13 | { |
|---|
| 14 | my $dl = "<a href=\"$LJ::SITEROOT/files/%%DATA%%\">HTTP</a>"; |
|---|
| 15 | if ($LJ::FTPPREFIX) { |
|---|
| 16 | $dl .= " - <a href=\"$LJ::FTPPREFIX/%%DATA%%\">FTP</a>"; |
|---|
| 17 | } |
|---|
| 18 | BML::register_block("DL", "DS", $dl); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | BML::register_hook("startup", sub { LJ::start_request() }); |
|---|
| 22 | |
|---|
| 23 | if ($LJ::UNICODE) { |
|---|
| 24 | BML::set_default_content_type("text/html; charset=utf-8"); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | # pre-load common libraries so we don't have to load them in BML files (slow) |
|---|
| 28 | package BMLCodeBlock; |
|---|
| 29 | use LJ::TextMessage; |
|---|
| 30 | use LJ::TagGenerator ':html4'; |
|---|
| 31 | use Digest::MD5 qw(md5_hex); |
|---|
| 32 | use MIME::Words qw(encode_mimewords); |
|---|
| 33 | |
|---|
| 34 | require 'imageconf.pl'; |
|---|
| 35 | require 'propparse.pl'; |
|---|
| 36 | require 'supportlib.pl'; |
|---|
| 37 | require 'ljlib.pl'; |
|---|
| 38 | require 'ljprotocol.pl'; |
|---|
| 39 | require 'cleanhtml.pl'; |
|---|
| 40 | require 'emailcheck.pl'; |
|---|
| 41 | require 'portal.pl'; |
|---|
| 42 | require 'talklib.pl'; |
|---|
| 43 | require 'topiclib.pl'; |
|---|
| 44 | require 'ljtodo.pl'; |
|---|
| 45 | require 'directorylib.pl'; |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | 1; |
|---|