@@ -117,7 +117,7 @@ function createXHR(url) {
117117function doQuery ( ) {
118118 var type = document . getElementById ( 'type' ) ;
119119 var typeval = type . options [ type . selectedIndex ] . value ;
120- var object = document . getElementById ( 'object' ) . value . toLowerCase ( ) ;
120+ var object = document . getElementById ( 'object' ) . value ;
121121
122122 if ( 'autnum' == typeval ) {
123123 object = object . replace ( / ^ a s n ? / i, '' ) ;
@@ -130,16 +130,16 @@ function doQuery() {
130130 url = object ;
131131
132132 } else if ( 'tld' == typeval ) {
133- url = 'https://rdap.iana.org/domain/' + object + queryParams ;
133+ url = 'https://rdap.iana.org/domain/' + object . toLowerCase ( ) + queryParams ;
134134
135135 } else if ( 'registrar' == typeval ) {
136- url = 'https://registrars.rdap.org/entity/' + object + '-IANA' + queryParams ;
136+ url = 'https://registrars.rdap.org/entity/' + object . toLowerCase ( ) + '-IANA' + queryParams ;
137137
138138 } else if ( 'json' == typeval ) {
139139 url = 'json://' + object ;
140140
141141 } else {
142- url = getRDAPURL ( typeval , object ) ;
142+ url = getRDAPURL ( typeval , object . toLowerCase ( ) ) ;
143143 if ( url ) url += queryParams ;
144144
145145 }
@@ -683,7 +683,7 @@ function processRemarksOrNotices(things) {
683683
684684 var title = document . createElement ( 'header' ) ;
685685 title . classList . add ( 'card-header' , 'font-weight-bold' ) ;
686- title . appendChild ( document . createTextNode ( things [ i ] . title ) ) ;
686+ title . appendChild ( document . createTextNode ( things [ i ] . title ?? things [ i ] . type ) ) ;
687687 section . appendChild ( title ) ;
688688
689689 var body = document . createElement ( 'div' ) ;
@@ -701,6 +701,11 @@ function processRemarksOrNotices(things) {
701701 processLinks ( things [ i ] . links , ldl ) ;
702702 body . appendChild ( ldl ) ;
703703 }
704+
705+ if ( body . childNodes . length < 1 ) {
706+ body . parentNode . removeChild ( body ) ;
707+ }
708+
704709 }
705710
706711 return div ;
0 commit comments