Skip to content

Commit

Permalink
Add HTML5 media tags to list of known tags and attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Vieru authored and giuseppe committed Jun 25, 2013
1 parent 49f6d0d commit 6a2d67b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2013-06-19 Ciprian Vieru <[email protected]> (tiny change)

* html-url.c: Define TAG_TD, TAG_TH, TAG_VIDEO, TAG_AUDIO, TAG_SOURCE.
(tag_url_attributes, known_tags): Likewise.

2013-06-22 Ángel González <[email protected]>

* init.c (cmd_string_uppercase): Rewrite function.
Expand Down
17 changes: 14 additions & 3 deletions src/html-url.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ enum {
TAG_SCRIPT,
TAG_TABLE,
TAG_TD,
TAG_TH
TAG_TH,
TAG_VIDEO,
TAG_AUDIO,
TAG_SOURCE
};

/* The list of known tags and functions used for handling them. Most
Expand Down Expand Up @@ -110,7 +113,10 @@ static struct known_tag {
{ TAG_SCRIPT, "script", tag_find_urls },
{ TAG_TABLE, "table", tag_find_urls },
{ TAG_TD, "td", tag_find_urls },
{ TAG_TH, "th", tag_find_urls }
{ TAG_TH, "th", tag_find_urls },
{ TAG_VIDEO, "video", tag_find_urls },
{ TAG_AUDIO, "audio", tag_find_urls },
{ TAG_SOURCE, "source", tag_find_urls }
};

/* tag_url_attributes documents which attributes of which tags contain
Expand Down Expand Up @@ -157,7 +163,12 @@ static struct {
{ TAG_SCRIPT, "src", ATTR_INLINE },
{ TAG_TABLE, "background", ATTR_INLINE },
{ TAG_TD, "background", ATTR_INLINE },
{ TAG_TH, "background", ATTR_INLINE }
{ TAG_TH, "background", ATTR_INLINE },
{ TAG_VIDEO, "src", ATTR_INLINE },
{ TAG_VIDEO, "poster", ATTR_INLINE },
{ TAG_AUDIO, "src", ATTR_INLINE },
{ TAG_AUDIO, "poster", ATTR_INLINE },
{ TAG_SOURCE, "src", ATTR_INLINE }
};

/* The lists of interesting tags and attributes are built dynamically,
Expand Down

0 comments on commit 6a2d67b

Please sign in to comment.