Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<img>标签不能带有class,否则图片一直在加载中 #89

Closed
SkiTiSu opened this issue Jun 14, 2019 · 5 comments
Closed

<img>标签不能带有class,否则图片一直在加载中 #89

SkiTiSu opened this issue Jun 14, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@SkiTiSu
Copy link

SkiTiSu commented Jun 14, 2019

正在把博客里的文章换成markdown,但是发现之前用wp图形化编辑器插入的图片,如

<img class="alignnone size-full wp-image-604" src="xxx.jpg">

只要带有class,使用本主题后就会一直显示加载中的动画,需要完全删除class,如

<img src="xxx.jpg">

才可以正常加载

@mashirozx
Copy link
Owner

并没有遇到你描述的问题

image

image

当然,如果你一定要在<img>里带class的话建议把functions.php第1514-1519行删掉:
image

@SkiTiSu
Copy link
Author

SkiTiSu commented Jun 14, 2019

感谢回复~在我的博客环境中的确存在这样的现象,不过现在已经逐渐把一些老文章换成md了也就不存在这个问题了

加上两个class
image
全部删掉
image

@lizhihao6
Copy link

确实存在这个问题……为什么我把所有格preloader.svg都注释掉了还是不行

@spirit1431007
Copy link
Collaborator

spirit1431007 commented Jul 10, 2019

确实存在这个问题……为什么我把所有格preloader.svg都注释掉了还是不行

重新改下正则
试一下这个:

'<img'.'$1'.'class="lazyload" data-src="'.'$2'.'" src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.2/img/svg/loader/trans.ajax-spinner-preloader.svg" onerror="imgError(this)"'.'$3'.' >\n<noscript>'.'$0'.'</noscript>';

@mashirozx mashirozx added the bug Something isn't working label Aug 3, 2019
@spirit1431007
Copy link
Collaborator

@SkiTiSu @lizhihao6 使用此处的正则后是否还有这个问题?

spirit1431007 added a commit to spirit1431007/Sakura that referenced this issue Dec 25, 2019
* Update sakura-app.js

监听浏览器resize 需要加settimeout

* Update README.md

* Update issue templates

* Update ---bug.md

* update comment textarea style

* clean up app.js

* update to v3.2.0

* bug fix

* 自动加载

* 自动加载update

* Update to v3.2.1

* 除虫&实时搜索

* update style

* Rest API for cache-search

* Close issue mashirozx#103

* Close mashirozx#59

* 主题切换相关代码重构

* 简化代码

* Update to v3.2.4

* modify options description

* update floating trick

* Update header.php

* Grammer

* Update header.php

* optimize

* 首页特色图对齐方式可选

* fix

* Aplayer歌曲列表滑动出现

当Aplayer的侧边 ‘>’按钮被点击后,Aplayer整体滑出,然后歌曲列表缓慢滑出。比起直接出现,观感应该会好一些。

* 删除不小心添加的无用代码

删除不小心添加的无用代码

* update to v3.2.5

* Close mashirozx#73

* 代码块单行代码也高亮

* fix mashirozx#79

* bug fix & optimize

* fix mashirozx#89

* Update sakura-app.js

* update to v3.2.6

* fix mashirozx#116

* new feature: github cards

* 吸顶效果

* 展开/收缩效果

* 标题样式

* 二级菜单不换行

* lazyload options

* Update README.md

* fix toc of github-style

* fix mashirozx#119

* 恢复意外删除的代码

* Change Gravatar server to official

* fix mashirozx#120

* 评论回复邮件通知可选

* 管理员评论回复通知可选

* Multi language initial

* 忘改名了-_-

* Translation 1910302148

* Translation 201910311333

* Translation 201910311725

* Translation 201910312203

* Translation 201911010020

* fix github-style

* Translation 1911011510

* Translation 201911012106

* update .mo

* fix

* update to v3.2.8

* update README

* fix

* Chinese first

* fix search

* 修改title和页面提示不对应

* bug fix

* imgur upload support

* more image upload api

* update translate

* curl notice

* add nonce check for api

* Update api.php

* optimize

* translate

* support sidebar widget

* translate

* fix

* fix style

* fix style

* 侧栏样式

* 后台登陆界面

* 评论Markdown解析

* Markdown Supported while </> Forbidden

* update to v3.3.2

* fix

* add author

* translate

* disable get_sidebar()

* update post views

* fix image gallery

* change curl to wp_remote_post

* fix SM.MS upload

* remove curl notice

* close mashirozx#143

* fix

* rest api for random images

* update api

* fix comment @

* manifest.py

* manifest.py

* manifest.py

* manifest.py

* update api

* GUI for manifest tool

* update readme

* update readme

* update json

* update cover images

* fix auth

* add upload to wp

* qq info restfull api

* rm

* Update manifest.py

* Update api.php

* Update api.php

* fix sql error

* fix

* Update README.md

* translate

* encrypt QQ avatar link

* add key pairs

* add choices

* fix

* change encrypt method

* update

* fix mashirozx#151

* Update Readme

* update to v3.3.3

* fix sm.ms upload

* fetch manifest.json at backend

* fix BBCode image

* update manifest

* fix

* minimize lib.js

Co-authored-by: liang xiao <13938586+Laxse@users.noreply.github.com>
Co-authored-by: Mashiro <moezhx@outlook.com>
Co-authored-by: enjoyuruf <39794567+enjoyuruf@users.noreply.github.com>
Co-authored-by: yuanhca <1161638319@qq.com>
spirit1431007 added a commit to spirit1431007/Sakura that referenced this issue Dec 26, 2019
* remove personal info

* toc for pages

* fix motion

* fix

* fix

* Update README

* 添加要饭码

* Update README

* remove personal info

* fix comment rank bug

* Remove an useless tag...

* Update README

* PHP 7.2 supported

Fixed according to http://php.net/manual/zh/migration72.deprecated.php

* PHP 7.2 supported

* PHP version info

* Fix time difference issue

* Full support of PHP 7.2

* Player fixed mode support & some fix

* fix some little bug

* Some fix

* Update version info

* fix index.php and README.md encode.

* fix issue mashirozx#13 mashirozx#23

* Fix issue mashirozx#20

* Fix share plugin

* Fix share plugin & Abobe Typekit -> Google Fonts

* 添加登陆界面logo设置选项

添加设置选项

* 添加登陆界面logo设置选项

添加读取登录logo设置

* 添加登陆界面logo设置选项

登录外框居中调整;
顺带修复一处GBK编码到UTF8编码问题。

* Revert " 添加登陆界面logo设置选项"

* Fix issue mashirozx#28

* Hot fix

* Re-commit mashirozx#33

* close issue mashirozx#29 mashirozx#30

* Fix mashirozx#29

* Fix Google Analytics Tags

* Fix mashirozx#9

* Close issue mashirozx#9

* Close issue mashirozx#16

* 没感觉服务器负载有点重嘛

* Update decorate.php

* 2019.1.24 update v 3.1.1

* fix tocbot

* 修复sharejs编码问题

* Add entry content theme

* Update to v3.1.2

* remove comments tag

* Update README.md

* fix

* fix default theme & update to v3.1.3

* Update README.md

* update to v3.1.4

* bug fix

1311行,mb_substr是方法名,漏了''

* update v3.1.5

* bug fix

* Fix comment reply for wp-5.2 & update to v3.1.6

* fix

* fix

* fix

* fix registration

* fix registration

* Microsoft Edge Dev (Chromium) UA support

* Admin dashboard scheme

* Update to v3.1.7

* Update scheme

* Edit button for posts and comments

* fix for aplayer

* Not rely on WP-Statistics any more

* update readme

* update to v3.1.9

* remove wp_statistics from timeline

* fix

* enable oembed

* substitute [] with array()

* Update sakura-app.js

监听浏览器resize 需要加settimeout

* Update README.md

* Update issue templates

* Update ---bug.md

* update comment textarea style

* clean up app.js

* update to v3.2.0

* bug fix

* 自动加载

* 自动加载update

* Update to v3.2.1

* 除虫&实时搜索

* update style

* Rest API for cache-search

* Close issue mashirozx#103

* Close mashirozx#59

* 主题切换相关代码重构

* 简化代码

* Update to v3.2.4

* modify options description

* update floating trick

* Update header.php

* Grammer

* Update header.php

* optimize

* 首页特色图对齐方式可选

* fix

* Aplayer歌曲列表滑动出现

当Aplayer的侧边 ‘>’按钮被点击后,Aplayer整体滑出,然后歌曲列表缓慢滑出。比起直接出现,观感应该会好一些。

* 删除不小心添加的无用代码

删除不小心添加的无用代码

* update to v3.2.5

* Close mashirozx#73

* 代码块单行代码也高亮

* fix mashirozx#79

* bug fix & optimize

* fix mashirozx#89

* Update sakura-app.js

* update to v3.2.6

* fix mashirozx#116

* new feature: github cards

* 吸顶效果

* 展开/收缩效果

* 标题样式

* 二级菜单不换行

* lazyload options

* Update README.md

* fix toc of github-style

* fix mashirozx#119

* 恢复意外删除的代码

* Change Gravatar server to official

* fix mashirozx#120

* 评论回复邮件通知可选

* 管理员评论回复通知可选

* Multi language initial

* 忘改名了-_-

* Translation 1910302148

* Translation 201910311333

* Translation 201910311725

* Translation 201910312203

* Translation 201911010020

* fix github-style

* Translation 1911011510

* Translation 201911012106

* update .mo

* fix

* update to v3.2.8

* update README

* fix

* Chinese first

* fix search

* 修改title和页面提示不对应

* bug fix

* imgur upload support

* more image upload api

* update translate

* curl notice

* add nonce check for api

* Update api.php

* optimize

* translate

* support sidebar widget

* translate

* fix

* fix style

* fix style

* 侧栏样式

* 后台登陆界面

* 评论Markdown解析

* Markdown Supported while </> Forbidden

* update to v3.3.2

* fix

* add author

* translate

* disable get_sidebar()

* update post views

* fix image gallery

* change curl to wp_remote_post

* fix SM.MS upload

* remove curl notice

* close mashirozx#143

* fix

* rest api for random images

* update api

* fix comment @

* manifest.py

* manifest.py

* manifest.py

* manifest.py

* update api

* GUI for manifest tool

* update readme

* update readme

* update json

* update cover images

* fix auth

* add upload to wp

* qq info restfull api

* rm

* Update manifest.py

* Update api.php

* Update api.php

* fix sql error

* fix

* Update README.md

* translate

* encrypt QQ avatar link

* add key pairs

* add choices

* fix

* change encrypt method

* update

* fix mashirozx#151

* Update Readme

* update to v3.3.3

* fix sm.ms upload

* fetch manifest.json at backend

* fix BBCode image

* update manifest

* fix

* minimize lib.js

* bug fix

* update to v3.3.5

Co-authored-by: Mashiro <moezhx@outlook.com>
Co-authored-by: mlge <admin@mlge.xyz>
Co-authored-by: 青花鱼OvO <kot4ri@gmail.com>
Co-authored-by: Himehane <36065996+Himehane@users.noreply.github.com>
Co-authored-by: liang xiao <13938586+Laxse@users.noreply.github.com>
Co-authored-by: enjoyuruf <39794567+enjoyuruf@users.noreply.github.com>
Co-authored-by: yuanhca <1161638319@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants