movabletype

How do I most reliably preserve HTML Entities when processing HTML documents with Mojo::DOM?

旧巷老猫 提交于 2020-08-24 07:26:44
问题 I'm using Mojo::DOM to identify and print out phrases (meaning strings of text between selected HTML tags) in hundreds of HTML documents that I'm extracting from existing content in the Movable Type content management system. I'm writing those phrases out to a file, so they can be translated into other languages as follows: $dom = Mojo::DOM->new(Mojo::Util::decode('UTF-8', $page->text)); ########## # # Break down the Body into phrases. This is done by listing the tags and tag combinations

How do I most reliably preserve HTML Entities when processing HTML documents with Mojo::DOM?

▼魔方 西西 提交于 2020-08-24 07:25:09
问题 I'm using Mojo::DOM to identify and print out phrases (meaning strings of text between selected HTML tags) in hundreds of HTML documents that I'm extracting from existing content in the Movable Type content management system. I'm writing those phrases out to a file, so they can be translated into other languages as follows: $dom = Mojo::DOM->new(Mojo::Util::decode('UTF-8', $page->text)); ########## # # Break down the Body into phrases. This is done by listing the tags and tag combinations

pages are displaying plain text instead of html

自作多情 提交于 2019-12-29 08:46:48
问题 I am hosting multiple sites on the same server and using a http-vhosts file to specify virtual host info for them. It is working great. The problem is I changed in Movable Type the way entries are created. I want them to not have file extension. So it is currently domain.com/entry/15 instead of domain.com/entry/15.html. Because I took out the .html I'm assuming apache doesn't know what to do so it is spitting out the page as plain text. How can I fix this? I added in a virtualhost block:

How can I time processing of chunk of code using MT template language?

纵饮孤独 提交于 2019-12-14 03:01:50
问题 Often when developing a Movable Type template, I come up with multiple ways to generate the same result, and am curious which is more efficient. Or, I simply want to know how long something took, such as generating search results. Is there an easy way to recording processing time or other timing strategies using template tags without requiring external tools? 回答1: Or you could use the debug mode 8 as explained here: http://www.movabletype.org/documentation/developer/plugins/debug-mode.html

pages are displaying plain text instead of html

微笑、不失礼 提交于 2019-11-29 14:42:04
I am hosting multiple sites on the same server and using a http-vhosts file to specify virtual host info for them. It is working great. The problem is I changed in Movable Type the way entries are created. I want them to not have file extension. So it is currently domain.com/entry/15 instead of domain.com/entry/15.html. Because I took out the .html I'm assuming apache doesn't know what to do so it is spitting out the page as plain text. How can I fix this? I added in a virtualhost block: DefaultType text/html I also added that in the httpd.conf hoping it would fix it globally for all my sites.