SF.net SVN: geany:[5796] trunk
colombanw at users.sourceforge.net
colombanw at xxxxx
Wed May 11 22:52:06 UTC 2011
Revision: 5796
http://geany.svn.sourceforge.net/geany/?rev=5796&view=rev
Author: colombanw
Date: 2011-05-11 22:52:05 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Update the HTML encoding detection regex to accept more valid inputs
HTML 4.01 don't seem to require the http-equiv value to be quoted, so
make the quotes optional.
Also allow more than one space between the meta tag and its http-equiv
attribute.
Closes #3300703.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/encodings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-05-10 23:51:01 UTC (rev 5795)
+++ trunk/ChangeLog 2011-05-11 22:52:05 UTC (rev 5796)
@@ -1,3 +1,10 @@
+2011-05-12 Colomban Wendling <colomban(at)geany(dot)org>
+
+ * src/encodings.c:
+ Update the HTML content-type encoding detection regexp to accept some
+ more valid inputs (closes #3300703).
+
+
2011-05-11 Colomban Wendling <colomban(at)geany(dot)org>
* src/plugins.c:
Modified: trunk/src/encodings.c
===================================================================
--- trunk/src/encodings.c 2011-05-10 23:51:01 UTC (rev 5795)
+++ trunk/src/encodings.c 2011-05-11 22:52:05 UTC (rev 5796)
@@ -51,7 +51,7 @@
#endif
/* <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> */
-#define PATTERN_HTMLMETA "<meta[ \t\n\r\f]http-equiv[ \t\n\r\f]*=[ \t\n\r\f]*\"content-type\"[ \t\n\r\f]+content[ \t\n\r\f]*=[ \t\n\r\f]*\"text/x?html;[ \t\n\r\f]*charset=([a-z0-9_-]+)\"[ \t\n\r\f]*/?>"
+#define PATTERN_HTMLMETA "<meta[ \t\n\r\f]+http-equiv[ \t\n\r\f]*=[ \t\n\r\f]*\"?content-type\"?[ \t\n\r\f]+content[ \t\n\r\f]*=[ \t\n\r\f]*\"text/x?html;[ \t\n\r\f]*charset=([a-z0-9_-]+)\"[ \t\n\r\f]*/?>"
/* " geany_encoding=utf-8 " or " coding: utf-8 " */
#define PATTERN_CODING "coding[\t ]*[:=][\t ]*\"?([a-z0-9-]+)\"?[\t ]*"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list