summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_libstr.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 19:52:29 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 19:52:29 +0000
commitbabf7873a3fe373d60ef22b1b671d98e014d8819 (patch)
treee21dfdb68839616efbbd884dfa77a1745f1c35d7 /protocols/MSN/src/msn_libstr.cpp
parenta89887eb202c99ce09107668561abce6704f9004 (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.cpp22
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, "&amp;"); q += 5; break;
- case '\'': strcpy(q, "&apos;"); q += 6; break;
- case '>': strcpy(q, "&gt;"); q += 4; break;
- case '<': strcpy(q, "&lt;"); q += 4; break;
- case '"': strcpy(q, "&quot;"); q += 6; break;
+ case '&': mir_strcpy(q, "&amp;"); q += 5; break;
+ case '\'': mir_strcpy(q, "&apos;"); q += 6; break;
+ case '>': mir_strcpy(q, "&gt;"); q += 4; break;
+ case '<': mir_strcpy(q, "&lt;"); q += 4; break;
+ case '"': mir_strcpy(q, "&quot;"); 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;