diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 19:52:29 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 19:52:29 +0000 |
commit | babf7873a3fe373d60ef22b1b671d98e014d8819 (patch) | |
tree | e21dfdb68839616efbbd884dfa77a1745f1c35d7 /protocols/MSN/src/msn_libstr.cpp | |
parent | a89887eb202c99ce09107668561abce6704f9004 (diff) |
replace strcpy to mir_strcpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_libstr.cpp')
-rw-r--r-- | protocols/MSN/src/msn_libstr.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/protocols/MSN/src/msn_libstr.cpp b/protocols/MSN/src/msn_libstr.cpp index c6ed14098e..78e9c66584 100644 --- a/protocols/MSN/src/msn_libstr.cpp +++ b/protocols/MSN/src/msn_libstr.cpp @@ -182,11 +182,11 @@ char* HtmlEncode(const char *str) if ((s = (char*)mir_alloc(c + 1)) != NULL) {
for (p = (char*)str, q = s; *p != '\0'; p++) {
switch (*p) {
- case '&': strcpy(q, "&"); q += 5; break;
- case '\'': strcpy(q, "'"); q += 6; break;
- case '>': strcpy(q, ">"); q += 4; break;
- case '<': strcpy(q, "<"); q += 4; break;
- case '"': strcpy(q, """); q += 6; break;
+ case '&': mir_strcpy(q, "&"); q += 5; break;
+ case '\'': mir_strcpy(q, "'"); q += 6; break;
+ case '>': mir_strcpy(q, ">"); q += 4; break;
+ case '<': mir_strcpy(q, "<"); q += 4; break;
+ case '"': mir_strcpy(q, """); q += 6; break;
default: *q = *p; q++; break;
}
}
@@ -275,12 +275,12 @@ void stripHTML(char* str) {
if ( *p == '<' )
{
- if ( !strnicmp( p, "<p>", 3 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
- else if ( !strnicmp( p, "</p>", 4 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<br>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<br />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
- else if ( !strnicmp( p, "<hr>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<hr />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
+ if ( !strnicmp( p, "<p>", 3 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
+ else if ( !strnicmp( p, "</p>", 4 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<br>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<br />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
+ else if ( !strnicmp( p, "<hr>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<hr />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
else {
char *l = strchr(p, '>');
if (l) { p = l; --q; } else *q = *p;
|