@@ -1490,7 +1490,7 @@ public function getMethodSynopsisElement(array $funcMap, array $aliasMap, DOMDoc
1490
1490
if ($ this ->isMethod ()) {
1491
1491
assert ($ this ->name instanceof MethodName);
1492
1492
$ role = $ doc ->createAttribute ("role " );
1493
- $ role ->value = $ this ->name ->className ->__toString ();
1493
+ $ role ->value = addslashes ( $ this ->name ->className ->__toString () );
1494
1494
$ methodSynopsis ->appendChild ($ role );
1495
1495
}
1496
1496
@@ -2763,12 +2763,13 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2763
2763
$ classSynopsis ->appendChild ($ classSynopsisInfo );
2764
2764
2765
2765
$ classReference = self ::getClassSynopsisReference ($ this ->name );
2766
+ $ escapedName = addslashes ($ this ->name ->__toString ());
2766
2767
2767
2768
if ($ this ->hasConstructor ()) {
2768
2769
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2769
2770
$ includeElement = $ this ->createIncludeElement (
2770
2771
$ doc ,
2771
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role=' $ this -> name ']) "
2772
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role=' $ escapedName ']) "
2772
2773
);
2773
2774
$ classSynopsis ->appendChild ($ includeElement );
2774
2775
}
@@ -2777,7 +2778,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2777
2778
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2778
2779
$ includeElement = $ this ->createIncludeElement (
2779
2780
$ doc ,
2780
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ this -> name ']) "
2781
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedName ']) "
2781
2782
);
2782
2783
$ classSynopsis ->appendChild ($ includeElement );
2783
2784
}
@@ -2786,7 +2787,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2786
2787
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2787
2788
$ includeElement = $ this ->createIncludeElement (
2788
2789
$ doc ,
2789
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role=' $ this -> name ']) "
2790
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role=' $ escapedName ']) "
2790
2791
);
2791
2792
$ classSynopsis ->appendChild ($ includeElement );
2792
2793
}
@@ -2801,9 +2802,10 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2801
2802
foreach ($ parentsWithInheritedMethods as $ parent ) {
2802
2803
$ classSynopsis ->appendChild (new DOMText ("\n " ));
2803
2804
$ parentReference = self ::getClassSynopsisReference ($ parent );
2805
+ $ escapedParentName = addslashes ($ parent ->__toString ());
2804
2806
$ includeElement = $ this ->createIncludeElement (
2805
2807
$ doc ,
2806
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ parent ')]) "
2808
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedParentName ')]) "
2807
2809
);
2808
2810
$ classSynopsis ->appendChild ($ includeElement );
2809
2811
}
0 commit comments