22.6.08
I’ve been slowly pushing upgrades through my NetBSD machines and recently upgraded the “music server” that runs SlimServer to power my SqueezeBoxen. That brought a new version of Perl on the machine, which made SlimServer unhappy — it wouldn’t start anymore. I tried to rerun the little script that downloads the “blessed” versions of various CPAN packages from Slim Devices, but the files needed for my trusty old 6.2.1 version were no longer available on their server.
Well, I can’t live without the SqueezeBoxen so an emergency update was needed. (more…)
1.6.08
Some time ago I added some UTF-8 pages to this site. I promptly started receiving one error message per page from the Swish-e search engine I’m using. Of course, the search results also showed “garbage” since Swish-e only handles single byte characters.
Today I got tired of the errors arriving in my mailbox, so I dug into the code and fixed things. (more…)
3.8.05
I was having trouble with ½ and ¾ in an article I was trying to publish on another WordPress-powered site. First I thought my browser was acting up, but soon became doubtful and realized I should look at the source of the page generated by WordPress. To my surprise I saw that the entity codes had been deliberately mangled.
I tracked down the source of the problem in the WordPress code. This patch fixes the problem.
31.1.05
Hans Rosenfeld ported EtherIP support from OpenBSD to NetBSD 2.0. Today I’ve committed that work to NetBSD-current, to be included in future releases of NetBSD.
EtherIP (RFC-3378) makes it possible to bridge Ethernet networks using tunnels over the Internet. While you could already use tunnels for IP traffic, now they can be used for any Ethernet traffic. I’m looking forward to using the Internet with my friends to play legacy networked games that only use IPX for LAN communication.
To setup a bridged network using tunnels, you need to create gif(4) interfaces for the tunnels, and a bridge(4) interface to connect the tunnels and the Ethernet (LAN) interfaces. (more…)
27.11.04
Aaarrrggghh!
I ended up writing the bottom half of the previous article three times, thanks to not having been careful enough when upgrading WordPress. I had lost my fixes that send out the necessary headers to prevent the admin pages from being cached. I guess others don’t get bit by this because they don’t have ExpiresActive enabled on their web server.
Anyway, I’ve saved the changes in a patch file now, for future reference…
6.6.04
I’ve created a couple of small patches to improve how WordPress works with Markdown:
markdown-balancetags.diff
The balanceTags function was preventing the Markdown autotags feature from working by thinking <http://server/page> is actually some sorf of an http tag. I didn’t want to completely disable balanceTags, so I added code to pass through http, https and ftp “tags” untouched.
markdown-first.diff
The wptexturize function must be called after Markdown to avoid unwanted “texturizing” of preformatted and code blocks. The fix was easy once I learned that filters have priorities. The default priority is 10, so I modified markdown.php to install itself at priority 8.
I’m beginning to think I should import WordPress to my local CVS repository.
28.5.04
PHP (or possibly Apache itself) inserts a default charset= field in the Content-Type: header. This can cause problems with the syndication feeds, if you are not using the exact same character set on your blog. In my case the character set I use on this site is iso-8859-15 while the default that shows up is iso-8859-1.
I modified wp-rss2.php to return the character set specified in the WordPress options, and then went through other files to apply the same change. You can download the full patch that should apply cleanly to WordPress 1.2.
24.5.04
The first revision of my Postfix configuration files was committed in RCS on February 19, 2001. By March 25th I had implemented a patch to allow me to use Postfix even on the central mail server. The patch allowed disabling canonical rewriting for the SMTP envelope recipient.
Traditionally the GW systems have supported the use of external mail redirection services (e.g. IKI ry and Pobox), and I did not want to discontinue this just because I switched the MTA. I think it is great that we can have mail headers correctly reflect the preferred mail address for all of our users, regardless how the mail enters our system. This is really just a “per-user configurable masquerading” of addresses. Doing it in the MTA avoids the need to modify all software to support configurable mail addresses (and the need to separately configure the address all over the place).
However, maintaining a private patch can take quite a bit of time, so I submitted my patch for inclusion in the official Postfix distribution. Unfortunately Wietse rejected it, but he encouraged me to model it after the masquerading classes. I’m hoping he will accept the new patch. I must admit, this approach is much nicer, allowing canonical maps to be enabled or disabled for any of envelope sender, envelope recipient, sender headers or recipient headers individually.
But I need to wait a couple of weeks to make sure the new implementation works without problems in production first. Brave souls out there can download the patch and try it out. Please let me know if you are using this feature, and how it works for you.
Provided that no problems surface, this feature should be part of the Postfix package in pkgsrc as well as in the NetBSD base system as they are upgraded to Postfix 2.1.1 or later.
23.5.04
I think WordPress needs dedicated filters to be applied on content and excerpt immediately when they are retrieved from the database, to be used by formatting filters such as Markdown.
I like Markdown, but I was having problems with how WordPress does not pass the complete article to it when the “more tag” is used, and when forming RSS descriptions. Markdown uses shorthand link tags that would normally be resolved with references placed at the end of the document. With the truncation, links were not being resolved, and what’s worse, Markdown notation was left in the resulting display.
I created a patch that fixes the problem for my current articles. However, I think multipage entries would still have this problem, so this patch is not sufficient. Also, I’m not sure if I’m causing undesirable side-effects by moving the the_excerpt filter further up in the code.
Before I start working on the filters to be applied on database retrieval, I’m waiting to hear back from WordPress developers about the approach, to avoid wasted work.