mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not embed js into "on" prefixed unknown attributes
This commit is contained in:
@@ -25,6 +25,7 @@ import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.TokenSet;
|
||||
import com.intellij.psi.xml.XmlTokenType;
|
||||
import com.intellij.util.text.CharArrayUtil;
|
||||
import com.intellij.xml.util.documentation.HtmlDescriptorsTable;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -111,7 +112,8 @@ abstract class BaseHtmlLexer extends DelegateLexer {
|
||||
final boolean style = name.equals(TOKEN_STYLE);
|
||||
final int state = getState() & BASE_STATE_MASK;
|
||||
final boolean script = name.equals(TOKEN_SCRIPT) ||
|
||||
((name.startsWith(TOKEN_ON) && name.indexOf(':') == -1 && !isHtmlTagState(state)));
|
||||
((name.startsWith(TOKEN_ON) && name.indexOf(':') == -1 && !isHtmlTagState(state) &&
|
||||
HtmlDescriptorsTable.getAttributeDescriptor(name) != null));
|
||||
|
||||
if (style || script) {
|
||||
// encountered tag name in end of tag
|
||||
|
||||
@@ -192,7 +192,7 @@ public class HtmlDescriptorsTable {
|
||||
return ourTagTable.get(tagName);
|
||||
}
|
||||
|
||||
static HtmlAttributeDescriptor getAttributeDescriptor(String attributeName) {
|
||||
public static HtmlAttributeDescriptor getAttributeDescriptor(String attributeName) {
|
||||
return ourAttributeTable.get(attributeName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user