Mercurial > pidgin.yaz
comparison libpurple/protocols/myspace/markup.c @ 24733:b0b3952aae27
Only validate the font face if it's non-null
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 16 Dec 2008 04:08:38 +0000 |
parents | e268ad14e693 |
children | ced7ff727a97 |
comparison
equal
deleted
inserted
replaced
24732:3c224208b814 | 24733:b0b3952aae27 |
---|---|
191 face = xmlnode_get_attrib(root, "f"); | 191 face = xmlnode_get_attrib(root, "f"); |
192 height_str = xmlnode_get_attrib(root, "h"); | 192 height_str = xmlnode_get_attrib(root, "h"); |
193 decor_str = xmlnode_get_attrib(root, "s"); | 193 decor_str = xmlnode_get_attrib(root, "s"); |
194 | 194 |
195 /* Validate the font face, to avoid constructing invalid HTML later */ | 195 /* Validate the font face, to avoid constructing invalid HTML later */ |
196 if (strchr(face, '\'') != NULL) | 196 if (face != NULL && strchr(face, '\'') != NULL) |
197 face = NULL; | 197 face = NULL; |
198 | 198 |
199 height = height_str != NULL ? atol(height_str) : 12; | 199 height = height_str != NULL ? atol(height_str) : 12; |
200 decor = decor_str != NULL ? atol(decor_str) : 0; | 200 decor = decor_str != NULL ? atol(decor_str) : 0; |
201 | 201 |