diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-08-03 23:29:01 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-08-03 23:29:01 +0200 |
| commit | ee8d3aa3f337cef3faae8d45c6e23ab05f380db8 (patch) | |
| tree | 3d150c956ccd753c5cc4feeff76d6b8ff7bb8266 /gallery-utils.h | |
| parent | 1e355114311d7bf44b96b11b745857a2b68e8a06 (diff) | |
| download | cataract-ee8d3aa3f337cef3faae8d45c6e23ab05f380db8.tar.xz | |
Always generate valid XHTML entities
No need to double-escape entities in source XML files, just use single & etc.
Diffstat (limited to 'gallery-utils.h')
| -rw-r--r-- | gallery-utils.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gallery-utils.h b/gallery-utils.h index 1547c90..95dbcff 100644 --- a/gallery-utils.h +++ b/gallery-utils.h @@ -23,10 +23,11 @@ /* * str_replace: replace substring 'search' with a 'replace' string - * - only one occurence of the string is replaced - * - reallocates the original string + * - multiple occurences of the string are replaced + * - specify 'exclude_when' if you want to skip replace when a string found at the place of 'search' + * - reallocates the original string */ -void str_replace (char **dst, const char *search, const char *replace); +void str_replace (char **dst, const char *search, const char *replace, const char *exclude_when); /* * copy_file: copy file from src to dst @@ -39,3 +40,8 @@ gboolean copy_file (const char *src, const char *dst); */ char *make_string (const char* substr, const int count); +/* + * fix_entities: replace all invalid & entities with & + * - returns newly allocated string + */ +void fix_entities (char **str);
\ No newline at end of file |
