Commit 51424c57 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Don't expose _escaped_fragment_ in print URL.

I feel these escaped fragment URL-s should be purely kept for search engines only.
parent 55444392
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ Ext.define('Docs.view.cls.Header', {
                    '<span>xtype: {[values.xtypes.join(", ")]}</span>',
                '</tpl>',
            '</h1>',
            '<a class="print" href="?_escaped_fragment_=/api/{name}" target="_blank">Print</a>',
            '<a class="print" href="?print=/api/{name}" target="_blank">Print</a>',
            {
                getClass: function(cls) {
                    if (cls.component) {
+2 −2
Original line number Diff line number Diff line
@@ -90,8 +90,8 @@ function decode_file($filename) {
  }
}

if (isset($_GET["_escaped_fragment_"])) {
  $fragment = $_GET["_escaped_fragment_"];
if (isset($_GET["_escaped_fragment_"]) || isset($_GET["print"])) {
  $fragment = $_GET["_escaped_fragment_"] ? $_GET["_escaped_fragment_"] : $_GET["print"];
  try {
    if (preg_match('/^\/api\/([^-]+)/', $fragment, $m)) {
      $json = decode_file("output/".$m[1].".js");