Changeset 2428041
- Timestamp:
- 11/29/2020 09:18:28 AM (5 years ago)
- Location:
- wxsync/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (1 diff)
-
setting.php (modified) (5 diffs)
-
wxsync.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wxsync/trunk/readme.txt
r2276243 r2428041 5 5 Requires at least: 3.3 6 6 Tested up to: 5.2.2 7 Stable tag:2.7. 87 Stable tag:2.7.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
wxsync/trunk/setting.php
r2274759 r2428041 188 188 189 189 <tr> 190 <th>去除所有HTML标签</th> 191 <td> 192 <select name="article_remotetag"> 193 <option value="0" <?php if(!empty($_COOKIE['article_remotetag']) && 0==$_COOKIE['article_remotetag']){echo 'selected';} ?>>保留</option> 194 <option value="1" <?php if(!empty($_COOKIE['article_remotetag']) && 1==$_COOKIE['article_remotetag']){echo 'selected';} ?>>去除</option> 195 </select> 196 </td> 197 </tr> 198 199 <tr> 200 <th>移除文中的链接</th> 201 <td> 202 <select name="article_remote_a_href"> 203 <option value="0" <?php if(!empty($_COOKIE['article_remote_a_href']) && 0==$_COOKIE['article_remote_a_href']){echo 'selected';} ?>>保留</option> 204 <option value="1" <?php if(!empty($_COOKIE['article_remote_a_href']) && 1==$_COOKIE['article_remote_a_href']){echo 'selected';} ?>>移除链接,保留内容</option> 205 <option value="2" <?php if(!empty($_COOKIE['article_remote_a_href']) && 2==$_COOKIE['article_remote_a_href']){echo 'selected';} ?>>移除链接和内容</option> 206 </select> 207 </td> 208 </tr> 209 210 <tr> 190 211 <th>移除【开头】图片序号(#分隔)</th> 191 212 <td> … … 241 262 242 263 </div> 264 <textarea id="debugresult_html" style="border-top: 1px solid #000;width: 100%;height: 300px;display: none;"> 265 </textarea> 243 266 </td> 244 267 </tr> … … 438 461 } 439 462 var article_imgurl = jQuery('select[name=article_imgurl]').val(); 463 var article_remotetag = jQuery('select[name=article_remotetag]').val(); 464 var article_remote_a_href = jQuery('select[name=article_remote_a_href]').val(); 440 465 441 466 reqIndex = 0; … … 470 495 wxsync_setsourcetxt:wxsync_setsourcetxt, 471 496 wxsync_replace_words:wxsync_replace_words, 472 article_imgurl:article_imgurl 497 article_imgurl:article_imgurl, 498 article_remotetag:article_remotetag, 499 article_remote_a_href:article_remote_a_href 473 500 }, 474 501 success: function(res) { … … 481 508 reqfunc(reqIndex); 482 509 }, 483 error: function( ) {510 error: function(XMLHttpRequest) { 484 511 jQuery('#suburl').html('请求失败,位置:'+reqIndex); 512 //err1 513 var str = XMLHttpRequest.responseText; 514 jQuery('#debugresult_html').text(str); 515 jQuery('#debugresult_html').css('display','block'); 485 516 } 486 517 -
wxsync/trunk/wxsync.php
r2276243 r2428041 4 4 Plugin URI: http://std.cloud 5 5 Description: 标准云微信公众号文章免费采集、<strong>任意公众号自动采集5元/月</strong>、<strong>历史文章导出20元/公众号</strong> 6 Version: 2.7. 86 Version: 2.7.9 7 7 Author: 标准云(std.cloud) 8 8 Author URI: http://std.cloud … … 24 24 $GLOBALS['wxsync_tab'] = ''; 25 25 $GLOBALS['wxsync_error'] = array(); 26 $GLOBALS['wxsync_ver'] = '2.7. 8';26 $GLOBALS['wxsync_ver'] = '2.7.9'; 27 27 $GLOBALS['wxsync_code'] = 0; 28 28 … … 57 57 ,'urls','override','article_time','article_status','article_cate','article_source','article_style','wxsync_setsourcetxt','article_type','article_checkrepeat' 58 58 ,'wxsync_rmheadimg','wxsync_rmtailimg','wxsync_replace_words','article_imgurl','article_href','article_debug','article_raw' 59 ,'host','port','username','password' );59 ,'host','port','username','password','article_remotetag','article_remote_a_href'); 60 60 foreach ($keys as $one){ 61 61 if(isset($_REQUEST[$one])){ … … 524 524 525 525 } 526 526 527 527 528 $html = str_replace($replace_v1, $replace_v2, $html); … … 620 621 } 621 622 623 624 //去除所有HTML标签 625 if(isset($req['article_remotetag']) && 1 == isset($req['article_remotetag'])){ 626 $content = str_replace('</p>', '<br>', $content); 627 $content = strip_tags($content, '<br><img><video><iframe><code><a><audio><canvas><input>'); 628 } 629 if(isset($req['article_remote_a_href'])){ 630 if(1 == $req['article_remote_a_href']){ 631 $content = preg_replace('/<a[^>]*>(.*?)<\/a>/i', '$1', $content); 632 } 633 if(2 == $req['article_remote_a_href']){ 634 $content = preg_replace('/<a[^>]*>(.*?)<\/a>/i', '', $content); 635 } 636 } 637 622 638 if('keep' == $article_checkrepeat){ 623 639 if (!$override && post_exists($articleTitle)) {
Note: See TracChangeset
for help on using the changeset viewer.