File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
assets/src/modules/sm/App/providers Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 22angular . module ( 'sm' ) . filter ( 'RMPUrl' , function ( ) {
33 return function ( input ) {
44 if ( input && input != "TBA" ) {
5- var nameParts = input . split ( " " ) ,
6- lastName = nameParts [ nameParts . length - 1 ] ;
7- return '<a target="_blank" href="http://www.ratemyprofessors.com/search.jsp?queryBy=teacherName&queryoption=HEADER&query=' + lastName + '&facetSearch=true&schoolName=rochester+institute+of+technology">' + input + '</a>' ;
5+ var EscapedName = input . replace ( / / g, "+" ) ;
6+ return '<a target="_blank" href="http://www.ratemyprofessors.com/search.jsp?queryBy=teacherName&queryoption=HEADER&query=' + EscapedName + '&facetSearch=true&schoolName=rochester+institute+of+technology">' + input + '</a>' ;
87 } else {
98 return '<a href="#">' + input + '</a>' ;
109 }
You can’t perform that action at this time.
0 commit comments