Comments (5)
fixed in 69a54d8
from dpn_glossary.
The fix is not solving the problem. Please have a look at the following images.
First image shows the regex process before the fix. As you can see,
<!--[if lt IE 9]><script ...></script><![endif]-->
is replaces by
<!--[if lt IE 9]><!--DPNGLOSSARY<script ...></script>--><![endif]-->
which ends in invalid html.
After the fix, the regex is too greedy. Everything from
<script ...></script><![endif]-->
to
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxx-1']);
_gaq.push(['_gat._anonymizeIp']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
is matching.
The result is also invalid html:
<!--[if lt IE 9]><!--DPNGLOSSARY<script src="/typo3conf/ext/myextension/Resources/Public/js/html5.js?1394455858" type="text/javascript"></script><![endif]-->
</head>
<body>
<p> SOME TEXT</p>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxx-1']);
_gaq.push(['_gat._anonymizeIp']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>-->
I really would like to help you with the regex, but I'm not a pro in that. I can only debug ;-)
from dpn_glossary.
wtf... I'm sorry will take a look at this :-(
worked on my test site
from dpn_glossary.
hopefully I think this is a satisfying soloution 3ddb0f0
from dpn_glossary.
THX, it works!
from dpn_glossary.
Related Issues (20)
- Words with german umlauts are not rendered properly. HOT 12
- No Content Object definition found at TypoScript object path "tt_content.list.20.dpnglossary_glossary" HOT 2
- multi word terms are not parsed correctly HOT 3
- Problem with term replacements if there is a character after the term word HOT 2
- Warnings in the log HOT 3
- Links in term mode 'Link' do not lead to the defined page HOT 7
- URL generation problem with slash in term name HOT 7
- Spelling Typo HOT 2
- Proposal: No replacement on linked pages HOT 9
- Filling out Description or Synonym as a non-admin user results in Error HOT 3
- Possible typolink fallback for tooltiptext to first description text if empty HOT 5
- Undocumented breaking change setup.txt -> setup.typoscript (v4 -> v5) HOT 1
- PHP 8.3 support HOT 3
- Compatibility Issue with TYPO3 v11.5 and PHP 7.4.x HOT 1
- More than one synonym not parsed HOT 4
- Term-name is linked to part page (term-mode link) HOT 1
- term within quotations marks HOT 2
- Priority of original term before synonym? HOT 2
- Words with an accent on the first letter are displayed in the index under the Undescore group HOT 5
- term with several parts breaks link creation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dpn_glossary.