commit | author | age
|
63c348
|
1 |
--- libtorrent-0.13.3/rak/string_manip.h.orig 2013-10-04 22:39:31.185674832 +0400 |
AW |
2 |
+++ libtorrent-0.13.3/rak/string_manip.h 2013-10-04 22:40:52.599710992 +0400 |
|
3 |
@@ -190,9 +190,10 @@ |
|
4 |
OutputIterator |
|
5 |
copy_escape_html(InputIterator first, InputIterator last, OutputIterator dest) { |
|
6 |
while (first != last) { |
|
7 |
- if (std::isalpha(*first, std::locale::classic()) || |
|
8 |
- std::isdigit(*first, std::locale::classic()) || |
|
9 |
- *first == '-') { |
|
10 |
+ if (isascii(*first)&& |
|
11 |
+ (std::isalpha(*first, std::locale::classic()) || |
|
12 |
+ std::isdigit(*first, std::locale::classic()) || |
|
13 |
+ *first == '-')) { |
|
14 |
*(dest++) = *first; |
|
15 |
|
|
16 |
} else { |
|
17 |
@@ -211,9 +212,10 @@ |
|
18 |
OutputIterator |
|
19 |
copy_escape_html(InputIterator first1, InputIterator last1, OutputIterator first2, OutputIterator last2) { |
|
20 |
while (first1 != last1) { |
|
21 |
- if (std::isalpha(*first1, std::locale::classic()) || |
|
22 |
- std::isdigit(*first1, std::locale::classic()) || |
|
23 |
- *first1 == '-') { |
|
24 |
+ if (isascii(*first1)&& |
|
25 |
+ (std::isalpha(*first1, std::locale::classic()) || |
|
26 |
+ std::isdigit(*first1, std::locale::classic()) || |
|
27 |
+ *first1 == '-')) { |
|
28 |
if (first2 == last2) break; else *(first2++) = *first1; |
|
29 |
|
|
30 |
} else { |