mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[svg] WEB-69508 Disable spell checking for data urls
GitOrigin-RevId: a00437b815b6094ad6f2cdf7f6c3af2478e565a2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7c617fd699
commit
c7a0752149
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
|
||||
<image
|
||||
width="40"
|
||||
clip-rule="evenodd"
|
||||
id="<TYPO descr="Typo: In word 'foddd'">foddd</TYPO>"
|
||||
xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTjMuMXoiIC8+CiAgICA8QzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNsbD0iI0ZGRkZGRiZnPg=="
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 461 B |
+4
@@ -41,6 +41,10 @@ public class XmlWithMistakesInspectionTest extends SpellcheckerInspectionTestCas
|
||||
doTest("enumerations.svg");
|
||||
}
|
||||
|
||||
public void testDataUrl() {
|
||||
doTest("dataUrl.svg");
|
||||
}
|
||||
|
||||
public void testLinkIntegrity() {
|
||||
doTest("htmlIntegrity.html");
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.spellchecker.tokenizer.TokenConsumer;
|
||||
import com.intellij.spellchecker.tokenizer.Tokenizer;
|
||||
import com.intellij.util.SmartList;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.io.URLUtil;
|
||||
import com.intellij.util.xml.DomElement;
|
||||
import com.intellij.util.xml.DomUtil;
|
||||
import com.intellij.xml.util.XmlEnumeratedValueReference;
|
||||
@@ -228,6 +229,11 @@ public class XmlSpellcheckingStrategy extends SuppressibleSpellcheckingStrategy
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not inspect data URIs
|
||||
if (URLUtil.isDataUri(ElementManipulators.getValueText(element))) {
|
||||
return;
|
||||
}
|
||||
|
||||
super.tokenize(element, consumer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user